beautypg.com

Apply the set text of container behavior, Apply the set text of status bar behavior, Apply the set text of text field behavior – Adobe Dreamweaver CC 2014 v.13 User Manual

Page 721: Apply the show-hide elements behavior

background image

To the top

To the top

To the top

Apply the Set Text Of Container behavior

The Set Text Of Container behavior replaces the content and formatting of an existing container (that is, any element that can contain text or other
elements) on a page with the content you specify. The content can include any valid HTML source code.

You can embed any valid JavaScript function call, property, global variable, or other expression in the text. To embed a JavaScript expression,
place it inside braces ({}). To display a brace, precede it with a backslash (\{).

Example:

The URL for this page is {window.location}, and today is {new Date()}.

1. Select an object and select Set Text > Set Text Of Container from the Add Behavior menu of the Behaviors panel.

2. In the Set Text Of Container dialog box, use the Container menu to select the target element.

3. Enter the new text or HTML in the New HTML box.

4. Click OK and verify that the default event is correct.

Apply the Set Text Of Status Bar behavior

The Set Text Of Status Bar behavior shows a message in the status bar at the lower-left corner 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. Visitors often ignore or overlook
messages in the status bar (and not all browsers provide full support for setting the text of the status bar); if your message is important, consider
displaying it as a pop-up message or as the text of an AP element.

Note: If you use the Set Text Of Status Bar behavior in Dreamweaver, the text of the status bar in the browser is not guaranteed to change
because some browsers require special adjustments when changing status bar text. Firefox, for example, requires that you change an Advanced
option that lets JavaScript change status bar text. For more information, see your browser’s documentation.

You can embed any valid JavaScript function call, property, global variable, or other expression in the text. To embed a JavaScript expression,
place it inside braces ({}). To display a brace, precede it with a backslash (\{).

Example:

The URL for this page is {window.location}, and today is {new Date()}.

1. Select an object and choose Set Text > Set Text Of Status Bar from the Add Behavior menu of the Behaviors panel.

2. In the Set Text Of Status Bar dialog box, type your message in the Message box.

Keep the message concise. The browser truncates the message if it doesn’t fit in the status bar.

3. Click OK and verify that the default event is correct.

Apply the Set Text Of Text Field behavior

The Set Text Of Text Field behavior replaces the content of a form’s text field with the content you specify.

You can embed any valid JavaScript function call, property, global variable, or other expression in the text. To embed a JavaScript expression,
place it inside braces ({}). To display a brace, precede it with a backslash (\{).

Example:

The URL for this page is {window.location}, and today is {new Date()}.

Create a named text field

1. Select Insert > Form > Text Field.

If Dreamweaver prompts you to add a form tag, click Yes.

2. In the Property inspector, type a name for the text field. Make sure the name is unique on the page (don’t use the same name for multiple

elements on the same page, even if they’re in different forms).

Apply Set Text Of Text Field

1. Select a text field and choose Set Text > Set Text Of Field from the Add Behavior menu of the Behaviors panel.

2. Select the target text field from the Text Field menu and enter your new text.

3. Click OK and verify that the default event is correct.

Apply the Show-Hide Elements behavior

714

This manual is related to the following products: