
463
Working with Divs and AP Elements
11
11. To keep the AP element in its current depth and not bring it to the front, deselect the
checkbox for While Dragging: Bring Element To The Front. To change the stacking order
of the AP element when it is released after dragging, select either Leave On Top or Restore
Z-index from the drop-down list.
12. To execute a JavaScript command when the AP element is dropped on the target, enter the
code in the Call JavaScript text box. If you want the script to execute every time the AP
element is dropped, enter the code in the When Dropped: Call JavaScript text box. If the
code should execute only when the AP element is dropped on the target, make sure there’s
a check in the Only If Snapped checkbox.
13. To change the event that triggers the action (the default is onLoad), select an event from
the drop-down list in the Events column.
Set Text of Container
You’ve seen how AP elements can dynamically move, and change their visibility and their depth—
but did you know that you can also change an AP element’s content dynamically? With Dream-
weaver, you can do it easily. A standard behavior, Set Text of Container, enables you to swap the
entire contents of one AP element for whatever you’d like. You’re not limited to exchanging just text,
either. Anything you can put into HTML, you can swap—which is pretty much everything!
Targeted JavaScript C