WebSpeed
Product Update Bulletin
Using JavaScript Source Files
If you develop JavaScript routines that are long and that are common to a number of applications, you may want to keep them in separate JavaScript source (
.js
) files.When deploying JavaScript source files, you must put them in the Web server’s root directory or in a subdirectory of the Web server’s root directory. You can then reference the file using the HTML SRC attribute. For example, the following calls
myscript.js
, which is injsscripts
a subdirectory of the Web server’s root directory:
You can also create references to JavaScript source files within Embedded SpeedScript. However, you must be careful to specify the complete
<SCRIPT>
tag expression and to escape the expression using back tics. For example, the following code snippet will not run the JavaScript file:
The problem is fixed when you assign the complete
<SCRIPT>
tag expression to the variable and enclose it in back tics:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |