|
|
|
| This page explains all of the extra options hidden away in these menus.
How to add an 'onClick' script-trigger STEP 1 Always begin editing the index file by opening the file in a simple text editor like Windows Notepad. The index file is the .txt file we send you by email when you configure the menu using the online configuration tool. It looks like a list, where each line contains exactly 10 inverted commas which sometimes have commands inserted between them. STEP 2
| "TEXT:my text;" "1" "" "SCRIPT:myFunction();" "" |
To add a script trigger, use the SCRIPT: command, followed by the name of your function. Don't forget that you must then add a function definition to your HTML page! If you want to check if the applet is really firing the script, use a simple alert('Got here!') line in your script. Remember that you must debug your scripts yourself - if they don't work, it's your job to correct them :-) STEP 3 Always finish your editing session with a test of the new addition. Ensure that you have saved the index file and placed it in the same directory as the other menu files. Do not change its name. And ensure that any additional resources you may have added, such as GIF or JPG files for icons, or AU files for sounds, are also in the correct place. Remember that when you try to view the results in a browser, an old version may be pulled out of cache and you won't see the changes. To avoid cache problems: with the Microsoft java interpreter you can keep CTRL-SHIFT pressed while reloading, and with the Sun java interpreter you will need to close all browser windows and then restart the browser. GENERAL POINTS To make sure that your index file remains correctly formatted, please observe the following simple rules. Each menu item is defined by a single line in the index file. This line must have 10 sets of inverted commas as shown in all the examples. Do not try to spread a menu item definition over more than one line - just make the line longer.
|
|
|
|