Writing scripts

Write a script using the editor. Once your script is complete, insert it into the page you are editing.

1. Select a script language from [Language]. For JavaScript, select [JavaScript]. For VBScript, select [VBScript].

2. Code the program between "<--"and "//-->". On the left side of the editor screen, a list of objects and libraries that can be used in scripts appears. Use these for your editing.

3. Click the [OK] button.

=>JavaScript is inserted. JavaScript is indicated by .

Related items

Display a message on the status line (JavaScript)

Display the current date and time on the status line (JavaScript)

Hint Meaning of "<--" and "//-->"

JavaScript code must be placed between "<--" and "//-->." VBScript must be placed between "<--" and "'-->." When a script is enclosed within these marks, those browsers that can read scripts can easily recognize the script. Browsers that can not handle scripts regard them as being comments.

Hint When scripts have been prepared in advance

When JavaScript files (*.js) have been prepared in advance, you can insert JavaScript simply by selecting the desired file on the [Contents] tab, dragging it, and dropping it into the editing area. If the Homepage Builder reference materials have been installed, you can access JavaScript samples. To display these samples, click the [Contents] tab and select [Java Script] from the upper left box. ([Java Script] is part of the [Sample Materials].) To insert these samples, select the desired sample, drag it, and drop it into the editing area.

Hint Inserting scripts into headers

Select "Edit"->"Document Properties" from the menu and display the "Attribute" dialog. Click the [Others] tab, followed by the [Edit Script] button. The script editor opens. Edit the script using the editor, and then click the [OK] button. The script is inserted into the page header (In HTML, that part between the <HEAD> tag and</HEAD> tag.).