• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. Scripts > Adding an "Automatic" Script

Adding an "Automatic" Script

There are two kinds of scripts—those that are executed without the visitor having to do anything and those that react to something the visitor has done. The first group might be called "automatic scripts" and are executed by the browser when the page is loaded. You can have as many automatic scripts as you like on a page. They will run in the order they appear. (The second group, "triggered scripts", is discussed on page 294.)

To add an automatic script:

1.
In your HTML document, type <SCRIPT.

2.
Type LANGUAGE="script", where script is the name of the scripting language you'll be using: JavaScript, VBScript, etc.

3.
Type TYPE="text/language-name", where language-name identifies the scripting language you're using: javascript, vbscript, etc.

4.
Type >.

5.
Type the content of the script.

6.
Type </SCRIPT>.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint