Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Vista

Dreamweaver CS5 : Standard Server Behaviors (part 5) - Dynamic elements

- Windows 10 Product Activation Keys Free 2019 (All Versions)
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
7/12/2012 6:12:04 PM

12. Dynamic elements

With one exception, dynamic elements in Dreamweaver refer to form elements, linked to a data source field. Data-connected form elements are typically used in Web applications that update records. The single exception is Dynamic Text, which is described in the following section. Dynamic Form Elements are covered later.

12.1. Dynamic Text

Inserting a Dynamic Text server behavior is the same as dragging a field from a recordset on the Bindings panel onto the page. It's a matter of individual preference which technique you use; personally, I find dragging-and-dropping from the Bindings panel much faster and more intuitive than using the Dynamic Text server behavior.

Requirements: A dynamic page.

To use the Dynamic Text server behavior, follow these steps:

  1. Place your cursor on the page where you'd like the dynamic text to appear.

  2. From the Server Behaviors panel, choose Dynamic Elements => Dynamic Text. The Dynamic Text dialog box is displayed, as shown in Figure 15.

  3. If necessary, expand the recordset or other data source to select the desired dynamic data.

  4. Choose any necessary server format from the Format list.

    Figure 15. You can insert dynamic text through either the Server Behaviors panel or the Bindings panel.
  5. Enter any required adjustments to the dynamic data in the Code field. In most situations, no changes are necessary.

  6. Click OK when you're finished.


12.2. Dynamic List/Menu

The Dynamic List/Menu server behavior binds data to one or more aspects of a drop-down list. Dynamic data from a recordset is typically bound to both the values and labels of a list or menu element; static values and labels may also be combined with the dynamic data. In addition, you have the option to dynamically set the selected value, a feature often used when updating a record.

Requirements: A list/menu form element and a recordset.

To link a drop-down list to dynamic data, follow these steps:

  1. Insert a list/menu form element on a dynamic page with a recordset.

  2. If you have more than one list/menu on the page, select the one you want to convert.

  3. From the Server Behaviors panel, choose Dynamic Form Elements => Dynamic List/Menu. The Dynamic List/Menu dialog box, shown in Figure 16, is displayed.

    Figure 16. Lists give the user a series of items from which to choose.
  4. Verify that the desired drop-down list is displayed in the Menu list.

  5. In the Static Options box, add any nondynamic items you want to the top of the list menu. This could be something as simple as a label for the list menu or as complicated as a full URL with query strings for search pages.

  6. Choose the recordset you want to work with from the Options From Recordset list.

  7. Choose the field from your data source containing the items that you want displayed to the user from the Labels list.

  8. Choose the field from your data source containing the items you want submitted by the user from the Values list.

  9. To preselect an item, enter its value in the Select Value Equal To field or use the lightning bolt icon to choose a value from the established data sources.

  10. Click OK when you're finished.


12.3. Dynamic Text Field

Unlike the Dynamic Text server behavior, the Dynamic Text Field server behavior is not just for show. The Dynamic Text Field server behavior is often used for applications that update records and may be applied to either a text field or text area form element. According to the server model used, the data in the text field can be formatted server-side in a number of ways, such as upper- or lowercase.

Requirements: A text field or text area form element and a recordset.

To link a text field or text area to dynamic data, follow these steps:

  1. Insert a text field into a form on a page with a recordset or other data source. It's a good idea to name the text field and form at this point. Although you can always change the names later, naming the elements early on avoids problems later.

  2. Select the text field.

  3. From the Server Behaviors panel, choose Dynamic Form Elements => Dynamic Text Field.

    Be sure to choose Dynamic Text Field and not Dynamic Text from the Dynamic Elements submenu. If you select Dynamic Text while your text field is highlighted, the form element is replaced.


  4. In the Dynamic Text Field dialog box that appears (see Figure 17), verify that the correct form element was chosen in the Text Field list. If necessary, choose a different text field.

    Figure 17. You can make a data field editable by connecting it to a Dynamic Text Field.
  5. Click the Set Value To lightning bolt icon to display the available data sources.

  6. Choose a field from the Dynamic Data dialog box.

  7. If desired, you can apply a server format to the data by choosing an entry in the Format list.

  8. Click OK to close the Dynamic Data dialog box and, after reviewing your choices, click OK again to close the Dynamic Text Field dialog box.


12.4. Dynamic CheckBox

Checkboxes provide users with a method of selecting one or more options in a group; a Dynamic CheckBox server behavior marks any affiliated checkbox as selected if the desired criteria are met. This server behavior is often used in conjunction with a Boolean data field, also known as a True/False or Yes/No data field.

Requirements: A checkbox form element and a recordset.

To convert a static checkbox to a dynamic one, follow these steps:

  1. Select a checkbox in a form on a page with a recordset.

  2. From the Server Behaviors panel, choose Dynamic Form Elements => Dynamic CheckBox. The Dynamic CheckBox dialog box appears, as shown in Figure 18.

  3. Verify that your selected checkbox is correctly named in the CheckBox list.

  4. Click the Check If lightning bolt icon to display the available data sources.

  5. Choose a field from the Dynamic Data dialog box.

  6. If desired, you can apply a server format to the data by choosing an entry in the Format list. Click OK when you're finished to close the Dynamic Data dialog box.

    Figure 18. Checkboxes can depict whether a particular field of a recordset is True or False.
  7. Enter the value expected for a selected checkbox in the Equal To field. This value is data source–dependent. For many data sources, 1 is used to represent True; for others, a −1 is used. When working with Yes/No fields from Access databases, enter True; be sure to capitalize the word, because lowercase does not work properly.

  8. Click OK when you're finished.


12.5. Dynamic Radio Buttons

Radio buttons are employed in a form when the designer wants the user to make an exclusive choice among a set number of options. As with the Dynamic CheckBox server behavior, the Dynamic Radio Buttons server behavior is used to mark a particular element as selected when the defined criteria are met.

Requirements: Two or more radio button form elements and a recordset.

To link radio buttons to dynamic data, follow these steps:

  1. Select a group of radio buttons on a dynamic page with an available data source.

  2. From the Server Behaviors panel, choose Dynamic Form Elements => Dynamic Radio Buttons. The Dynamic Radio Buttons dialog box appears, as shown in Figure 19.

  3. Verify that your selected form element is displayed in the Radio Button Group list.

  4. In the Radio Button Values area, choose the first entry shown and, if necessary, change the Value field to reflect the expected data.

  5. Repeat Step 4 for every radio button in the group.

  6. Click the Select Value Equal To lightning-bolt icon to display the available data sources.

    Figure 19. Radio buttons can reflect a limited number of choices within a data source field.
  7. Choose a field from the Dynamic Data dialog box. Be sure to select a data source field with values parallel to those entered in the radio button group.

  8. If desired, you can apply a server format to the data by choosing an entry in the Format list. Click OK to close the Dynamic Data dialog box.

  9. When you're finished, click OK to close the Dynamic Radio Buttons dialog box.

Other -----------------
- Dreamweaver CS5 : Standard Server Behaviors (part 4) - Update Record, Delete Record & User authentication
- Dreamweaver CS5 : Standard Server Behaviors (part 3) - Go To Detail Page, Related Page & Insert Record
- Dreamweaver CS5 : Standard Server Behaviors (part 2) - Recordset Paging, Move To Specific Record & Show Region
- Dreamweaver CS5 : Standard Server Behaviors (part 1) - Recordset & Repeat Region
- CorelDRAW X5 : Text and Styles
- CorelDRAW X5 : Wrapping Text Around Other Shapes
- Adobe Illustrator CS5 : Working with Layers - Flattening Layers & Locating Objects in the Layers Panel
- Adobe Illustrator CS5 : Working with Layers - Moving Objects to a Layer
- Adobe Photoshop CS5 : The Essential Adjustments: White Balance
- Adobe Photoshop CS5 : Miss the JPEG Look? Try Applying a Camera Profile
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
Celebrity Style, Fashion Trends, Beauty and Makeup Tips.
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server