|
Using Scripts to Extend ASP
VBScript, JavaScript, and JScript are scripting languages that, when added
to an HTML file with SCRIPT tags, will allow for some tailoring of
display. These languages generally are run on the client side; in other words, they are
run by the browser when called for. Used on their own, they have some serious drawbacks.
- They are browser-specific, so the same code may be interpreted
differently depending on the browser being used.
- They can't be used to refer to a database (such as a product catalog)
or to store data.
Despite these drawbacks, scripting languages can be useful. Possibly their best use is in validating data; for example, guaranteeing that certain fields have been filled out within a form before the data is sent
back to the server for processing. This is done by having a script run when someone clicks
on the submit button of a form. The function would check all of the form's required fields. If any of the required fields were left empty, the script would display an alert message informing the user that they had left a field blank.
Scripts can be used on the server side, but they are more commonly used on the client side. There is an attribute of the SCRIPT tag that allows the programmer to
determine where the code is to be interpreted. The default is to process
all code in SCRIPT tags on the client side (in the browser), but the
programmer can set the attribute so that scripts are processed on the
server.
|
Microsoft Scripting Technologies
Information and tutorials on scripting, including VBScript and JScript.
Creating ASP Pages
A tutorial that shows how to create the popular "Hello World!" script.

|