beautypg.com

Attaching javascript behaviors to links, Link to documents using the property inspector, Link to documents using the point-to-file icon – Adobe Dreamweaver CC 2015 User Manual

Page 344

background image

337

Linking and navigation

Last updated 6/3/2015

Attaching JavaScript behaviors to links

You can attach a behavior to any link in a document. Consider using the following behaviors when you insert linked
elements into documents:

Set Text Of Status Bar

Determines the text of a message and displays it in the status bar at the lower left of the browser

window. For example, you can use this behavior to describe the destination of a link in the status bar instead of showing
the URL associated with it.

Open Browser Window

Opens a URL in a new window. You can specify the properties of the new window, including

its name, size, and attributes (whether it is resizable, has a menu bar, and so on).

Jump Menu

Edits a jump menu. You can change the menu list, specify a different linked file, or change the browser

location in which the linked document opens.

Link to documents using the Property inspector

You can use the Property inspector’s folder icon or Link box to create links from an image, an object, or text to another
document or file.

1

Select text or an image in the Document window’s Design view.

2

Open the Property inspector (Window > Properties) and do one of the following:

• Click the folder icon

to the right of the Link box to browse to and select a file.

The path to the linked document appears in the URL box. Use the Relative To pop-up menu in the Select HTML
File dialog box to make the path document-relative or root-relative, and then click Select. The type of path you
select applies only to the current link. (You can change the default setting of the Relative To box for the site.)

• Type the path and filename of the document in the Link box.

To link to a document in your site, enter a document-relative or site root–relative path. To link to a document
outside your site, enter an absolute path including the protocol (such as http://). You can use this approach to
enter a link for a file that hasn’t been created yet.

3

From the Target pop-up menu, select a location in which to open the document:

• _blank loads the linked document in a new, unnamed browser window.

• _parent loads the linked document in the parent frame or parent window of the frame that contains the link. If

the frame containing the link is not nested, then the linked document loads in the full browser window.

• _self loads the linked document in the same frame or window as the link. This target is the default, so you usually

don’t have to specify it.

• _top loads the linked document in the full browser window, thereby removing all frames.

If all the links on your page will be set to the same target, you can specify this target once by selecting Insert > HTML
> Head Tags > Base and selecting the target information. For information about targeting frames, see

Control frame

content with links

.

Link to documents using the Point-To-File icon

1

Select text or an image in the Document window’s Design view.

2

Create a link in one of two ways:

• Drag the Point-To-File icon

(target icon) at the right of the Link box in the Property inspector and point to a

visible anchor in the current document, a visible anchor in another open document, an element that has a unique
ID assigned to it, or a document in the Files panel.