SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 768 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

You can enter either plain text, which is rendered
in the default paragraph style, or any amount of HTML code, including , ,
or other tags.
395
Working with Divs and AP Elements 11
Targeted JavaScript Commands
You can enter the following simple yet useful JavaScript commands in the Snap JavaScript text box of the
Drag AP Element dialog box:
n To display a brief message to the user after the AP element is dropped, use the alert() function:
alert(???You hit the target???)
n To send the user to another Web page when the AP element is dropped in the right location, use
the JavaScript location object:
location = ???http://www.yourdomain.com/yourpage.html???
The location object can also be used with relative URLs.
If you??™re entering a large amount of HTML, don??™t bother doing so by hand??”Dreamweaver
can do it for you. On a blank page, create your HTML content and then select and copy it.
Then, in the Set Text of Container dialog box, paste the code using Ctrl+V (Command+V).
7. Click OK when you??™re finished.
If you want several AP elements to change when a single event is triggered, just add more Set Text of
Container behaviors to the same object.
You may need to change the behavior event from its default; to do so, click the down arrow in
between the Event and Action columns on the Behaviors panel and choose a new event from
the list.


Pages:
756757758759760761762763764765766767 768 769770771772773774775776777778779780