WebSpeed
Product Update Bulletin


SpeedScript Versus JavaScript

It is a common practice to use both SpeedScript and JavaScript when developing WebSpeed applications. SpeedScript has advantages for developing the business logic of a applications, while JavaScript is a good programming tool for adding user interface elements to Web applications.

If you use either the Report or Detail Wizards in AppBuilder to create a WebSpeed Web object, you can view the resulting HTML source file and see a combination of SpeedScript and JavaScript. The wizards will create SpeedScript to implement database queries and updates, and they will create JavaScript event handlers (like onMouseOver, onClick, etc.,) to implement interactive features of the WebSpeed applications.

The <SCRIPT> tag for JavaScript employs the same syntax as the <SCRIPT> tag for Embedded SpeedScript:

<SCRIPT Language="JavaScript"> 
JavaScript code 
</SCRIPT> 

In some situations, you do not need a <SCRIPT> tag. JavaScript event handlers, for example, do not require a <SCRIPT> tag when they are used as an attribute to an HTML tag, as shown in the following:

<BODY onLoad="alert(’Done’);"> 

Some other factors that you should keep in mind when using JavaScript in WebSpeed applications are:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095