05.03.2013 Views

User Guide - NetObjects Fusion

User Guide - NetObjects Fusion

User Guide - NetObjects Fusion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 27 Building Dynamic Pages<br />

For an example even nonprogrammers can try, see “Customizing Default Actions”<br />

on page 559.<br />

1. In Page view, select the object whose parameter values you want to script, and<br />

add any actions you want to use as components of the JavaScript expression.<br />

For these actions, ignore the When field, since each action is triggered by the<br />

expression. Also, if an action’s only purpose is to be called by the expression,<br />

disable the action by clearing the check box next to it on the Actions tab of the<br />

Properties panel.<br />

2. Create the action whose parameter value you want generated by the expression,<br />

as described in “Adding Actions to Objects and Pages” on page 535. Or, open<br />

an existing action by double-clicking it on the Actions tab of the Properties<br />

panel.<br />

3. In the Set Action dialog, open the Parameters menu and choose Expression.<br />

The JavaScript Expression dialog appears. If the action already has default<br />

parameter values, the dialog displays the code for those values.<br />

4. Enter your own JavaScript to generate the parameter value, or modify the code<br />

that’s already there. <strong>NetObjects</strong> <strong>Fusion</strong> doesn’t verify code you enter, so be sure<br />

to use valid syntax.<br />

Enter a JavaScript expression here,<br />

replacing or modifying existing code<br />

Opens a list of actions you can call<br />

from the expression<br />

To build your expression around existing actions, click the Insert Action button,<br />

select an action from the Actions dialog, and click OK. <strong>NetObjects</strong> <strong>Fusion</strong><br />

inserts the action at the insertion point, in the form $(ActionName).<br />

5. Click OK in the JavaScript Expression dialog and again in the Set Action<br />

dialog.<br />

When the action is triggered, it uses the parameter values generated by your<br />

expression.<br />

549

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!