Home
Download
User Info
New User FAQ
Tutorials
Demos
Commands
Variables
Troubleshooting
Code Examples
Sysop Info
Sysop FAQ
Theory
Installation
Management
Tests
Troubleshooting
FAQ
Feedback
Useful Links
Release Notes
Credits
Disclaimer

SourceForge Logo

Home
Download
User Info
New User FAQ
Tutorials
Demos
Commands
Variables
Troubleshooting
Code Examples
Sysop Info
Sysop FAQ
Theory
Installation
Management
Tests
Troubleshooting
FAQ
Feedback
Useful Links
Release Notes
Credits
Disclaimer

SourceForge Logo

Home
Download
User Info
New User FAQ
Tutorials
Demos
Commands
Variables
Troubleshooting
Code Examples
Sysop Info
Sysop FAQ
Theory
Installation
Management
Tests
Troubleshooting
FAQ
Feedback
Useful Links
Release Notes
Credits
Disclaimer

SourceForge Logo

NeoWebScript™ New User FAQ

Q. What is NeoWebScript™?

A. NeoWebScript™ is a Tcl-based programming language that allows both simple and complex programs to be embedded into HTML files.

When an HTML page containing embedded NeoWebScript™ is requested, the NeoWebScript/enabled webserver goes to it's hard drive to make a copy of the page as usual, but does not immediately send that copy of the page to the requesting browser. Instead, the webserver reads the page, looking for the special <nws> </nws> tags, that mark the embedded NeoWebScript™. When it finds them, it executes the NeoWebScript™ commands embedded between them, replaces the <nws> </nws> tags and everything between them with the results of those commands, then sends this new, customized page to the requesting browser, where it is read and displayed as any other web page.

Technically speaking, this is called a Server Side Include (SSI). Closely related to the more widely known CGI scripts and programming, it has some distinct advantages. For the user, foremost of these is the above described ability to write the programming code directly in the web page. This allows someone new to NeoWebScript™ and/or programming to start small, with tiny bits of code to do specific things, and add more features as they learn more. In contrast, CGI's normally require that you have a complete, functioning program before they can do anything.

Q. How difficult is it to install NeoWebScript™ as my webserver?

A. We think it's pretty easy, but it does require some patience, a little bit of knowledge of webservers, C, Unix, etc. If you want out-of-box type installation, look for coming binary releases with native install packages. If you are having trouble, contact us at neowebscript@neosoft.com for assistance. Of course, we'd like you to buy a license and pay for support, but we want you to succeed with it as well, so we'll answer some questions via email.

Q. Can you show me exactly how I would use NeoWebScript™ in my web pages?

Just insert your NeoWebScript™ into any HTML document, with the special <nws> </nws> HTML-like directives preceeding and following your code. Here is a complete example of a web page that uses embedded NeoWebScript™ code to generate a random background color. (snipped from the Lottery Picker in Demos):

<html>
<head>
<title>Lottery Picker</title>
</head>
<nws>
    random seed
    set red [format %02x [expr [random 128] + 128]]
    set green [format %02x [random 256]]
    set blue [format %02x [expr [random 128] + 128]]
    html "<body bgcolor=$red$green$blue>"
</nws>
<h3>Isn't this neat?</h3>
</body>
</html>
While this is the preferred way, there is an another way that is supported for backward compatability. Rather than using <nws> and </nws>, it uses the comment style SSI tag <!--#nws code=' commands go here '-->. A major disadvantage of this way is that an apostrophe ('), anywhere in the code area, would cause the program to error out. Even worse, it translates HTML's special characters before executing code, so trying to use &#39; (the code for an apostrophe) would still cause the error. However, it does have the advantage of being treated as a comment by browsers. Normally, if you look at a page with NeoWebScript™ on your local drive, or on a non-NeoWebScript™ enabled server, you'd see all the programming code in the page. With the old comment style tag, the code isn't shown directly, but only through viewing the source code.

There are three versions of this old style tag:
<!--#nws code=' commands go here '-->
<!--#neowebscript code=' commands go here '-->
<!--#neoscript code=' commands go here '-->

As you can see, the use is almost identical to the <nws></nws> tags:

<html>
<head>
<title>Lottery Picker</title>
</head>
<!--#nws code='
    random seed
    set red [format %02x [expr [random 128] + 128]]
    set green [format %02x [random 256]]
    set blue [format %02x [expr [random 128] + 128]]
    html "<body bgcolor=$red$green$blue>"
'-->
<h3>Isn't this neat?</h3>
</body>
</html>

Q. I see "Neoscript" in some places, instead of "NeoWebScript"™. What gives?

A. Neoscript was our original name for this product. Then we discovered that the domain name neoscript.com had already been taken by another company. In a further twist of irony, at that time NeoSoft was their ISP (We're the oldest public dial-up ISP in Houston,TX, and one of the oldest in the US) and was serving that domain for them. So we picked a new name, but there's still some legacy traces.