Both
niceNames() and findObject() are found in the external JavaScript files included earlier.
Finally, you need to attach the initializeUI() to with an onLoad event in the HTML file.
Locate the tag and amend it so that it reads as follows:
Step 4: Apply the behavior
Now you can write the code that links your function to a specific tag and event. You can think of this
process in three steps:
1. Making sure that the user entered information in the right places
2. Organizing the user??™s parameter-form input into a more usable format
3. Returning the runtime function call
All these steps are executed in the applyBehavior() function, whose placeholder you included in your
action file.
You gather information from an action??™s parameter form in the same way that you gather data from a custom
object. Using the same techniques discussed in Chapter 33, you receive the input information and usually
convert it to local variables that are easier to handle. The number of variables is equal to the number of
arguments expected.
NOTE NOTE
BC 31
Creating a Behavior
Potentially, if any of the input from the parameter form might be sent out to a Web server??”
say, as a URL or a file??”you encode the text string so that UNIX servers can read it.
Pages:
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910