ONLINEGRAPHICPROOFING.COM

hose proof test - www.onlinegraphicproofing.com

Menu


As you'll see in the next chapter, "Layers in Dreamweaver," you can use the Drag Layer behavior to create functionality that allows


a user to manually click, hold, and drag objects within the web browser. I've used this behavior in the past to create children's web-based learning games. For instance, you can have two series of images, across the page from each other, where the images on the left are images of various types of fruit. On the other side of the screen you can have the phonetic spellings of the images. Using the Drag Layer behavior, you can have the user click, hold, and drag the word onto its respective picture and provide feedback. Again, this behavior is covered with more detail in Chapter 11. Go to URL Possibly the easiest behavior to use aside from the Popup Message behavior is the Go to URL behavior. You can use this behavior to quickly associate a link with a form object (such as a Button). Because form objects such as Buttons don't support the Href attribute, you must create links using JavaScript. The JavaScript is automated using the Go to URL is behavior. TIP The Go To URL behavior can also be used in conjunction with a standard link on an object to load two different pages into two different frames at the same time.   To attach this behavior to a Button object, follow these steps: 1. With your cursor in the same page we've been working with, insert a new Button form object by clicking the Button icon from the Forms category of the Insert bar. 2. When the Add Form Tag dialog appears, click No. 3. With the Button form object selected, change the Action to None so that the button doesn't try to submit or reset the non-existent form when it's clicked. You can also change the Label to read anything you'd like. I'll change mine to read Visit Macromedia. 4. With the Button object selected, choose the Go to URL behavior from the Add (+) menu in the Behaviors panel. The Go to URL dialog appears. 5. Initially, the dialog allows you to choose which window to open the link in. Because we're not working with frames, the only option in this list box is Main Window. For our example, this option is fine. Secondly, you can specify the path of the URL to which you want to link the Button form object by typing in the URL text box. I'll enter the full path to Macromedia's website, which is http://www.macromedia.com. When you finish, your dialog might resemble mine (see Figure 10.13). Figure 10.13. Enter the path to Macromedia's website in the URL text box. 6. Click OK. 7. If the selected event isn't onClick, change it to onClick now. When you finish, save your work and test the results in the browser by choosing the Preview in Browser option from the Document bar (or by pressing F12). When the page loads, click the Visit Macromedia button. You should immediately be redirected to Macromedia's website. Jump Menu and Jump Menu Go In the previous chapter, we used the Jump Menu object located in the Forms category of the Insert bar to build a drop-down menu-based navigation system. Remember that we clicked the icon in the Insert bar to launch the Jump Menu dialog, which allowed us to dynamically add items to a list. When we finished adding items, we clicked OK, and the finished product ended up looking something like Figure 10.14 (also available by opening jumpmenu.htm located in the project folder). Figure 10.14. The Jump Menu form object allowed us to build a drop-down menu-based navigation system.