embed javascript

hi all,how can I embed javascript in my JSC application?(samples of code I want to use: http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm)Message was edited by: gio_mori
[213 byte] By [gio_mori] at [2007-11-26 11:31:52]
# 1

Various options:

The palette has a script component you can drop on your page. It will point to an external file (usually put it in your resources directory)

Option 2:

Manually embed the script in your page by firing up the jsp editor and typing it in between a <Script> and </Script> tag. This is what i'm using at the moment as my scripts are specific to a single page.

Caution you may run into trouble using the second method with some javascript syntax (The && operator springs to mind) The work around for this is to use a CDATA[ section. It's been discussed here before... use the search facility (or have a look at the script for a table and duplicate that approach)

yossarian at 2007-7-7 3:47:41 > top of Java-index,Development Tools,Java Tools...