Wiki source code of WOJavaScript
Last modified by Pascal Robert on 2012/01/30 22:24
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{toc/}} | ||
2 | |||
3 | = Introduction = | ||
4 | |||
5 | WOJavaScript lets you embed a script written in JavaScript in a dynamically generated page. | ||
6 | |||
7 | = Usage = | ||
8 | |||
9 | {{code}} | ||
10 | |||
11 | WOJavaScript { | ||
12 | scriptFile=aPath; | scriptString=aString; | scriptSource=aURL; | ||
13 | [hideInComment=aBoolean;] ... | ||
14 | } | ||
15 | |||
16 | {{/code}} | ||
17 | |||
18 | = Bindings = | ||
19 | |||
20 | |((( | ||
21 | scriptFile | ||
22 | )))|((( | ||
23 | Path to the file containing the script. The path can be statically specified in the declaration file or it can be a java.lang.String, an object that responds to a description message by returning a java.lang.String, or a method that returns a java.lang.String. | ||
24 | ))) | ||
25 | |((( | ||
26 | scriptString | ||
27 | )))|((( | ||
28 | String containing the script. Typically, scriptString is an java.lang.String object, an object that responds to a description message by returning ajava.lang.String, or a method that returns an java.lang.String. | ||
29 | ))) | ||
30 | |((( | ||
31 | scriptSource | ||
32 | )))|((( | ||
33 | URL specifying the location of the script. | ||
34 | ))) | ||
35 | |((( | ||
36 | hideInComment | ||
37 | )))|((( | ||
38 | If hideInComment evaluates to true (or YES), the script will be enclosed in an HTML comment (<!(% style="text-decoration: line-through;" %)- script ~/~/(%%)->). Since scripts can generate errors in some older browsers that weren't designed to execute them, you may want to enclose your script in an HTML comment. Browsers designed to run these scripts will still be able to execute them despite the surrounding comment tags. | ||
39 | ))) | ||
40 | |||
41 | = Examples = | ||
42 | |||
43 | == Java methods == | ||
44 | |||
45 | == WOD-style == | ||
46 | |||
47 | {{code/}} | ||
48 | |||
49 | == Inline bindings (WOOGNL) == | ||
50 | |||
51 | {{code/}} | ||
52 | |||
53 | = Related documents = | ||
54 | |||
55 | [[ERXJavaScript>>url:http://wocommunity.org/documents/javadoc/wonder/latest/er/extensions/components/javascript/ERXJavaScript.html||shape="rect"]] |