JavaScript Workbench

JavaScript is a scripting language that is used to make web pages dynamic. We have adopted it for use in ASI WebLink. This section contains pages that illustrate how to write some JavaScript code, and provides the means to test it here in the VAR Center. You can take what you learn here, and apply it to your WebLink projects.

Code Samples

The code samples listed below each have their own page, describing how to use them. They also may have an area where you can experiment with the code.

Alert() Function

This example shows you how to create a popup box that can be used to alert the end user.

Creating Custom Menubars

This example shows you how to create custom menubars for your ASI WebLink project.

Default Toolbar and Custom Menubar Fig. 1 Default toolbar and custom menubars

NavBarMenu() Function

This function allows you to define an new custom menubar as a JavaScript variable. Examples of the different ways to use this function are given on this page.

NavBarMenuItem() Function

This function allows you to add content to custom menubars. Examples of the different ways to use this function are given on this page.

.addItem() Method

This method allows you to invoke the NavBarMenuItem() function. Examples of the different ways to use this function are given on this page.

.addMenu() Method

This method allows you to add an new custom menubar to the default menubar. Examples of the different ways to use this function are given on this page.