Adobe dreamweaver cs6 classroom in a book

Page 388

Creating a dynamic table for classes and seminars Before you move on to the next exercise, use the skills and understanding you have learned so far to rebuild the Spry table for the classes and seminars. The steps to re-create this table are simple and straightforward. 1 Create a recordset that returns data from all fields of the Class table in the database. Unlike the events recordset, there’s no need to filter or sort the class data by date. You can sort by class_name if you would like the events to be listed in alphabetical order.

P Note: Except for

the date filtering, the steps needed to replace the remaining Spry Class table with a PHP equivalent are identical to the ones described in this exercise. If you have the time, put your new skills to the test and try replacing the remaining Spry widget on your own.

P Note: You may

need to click the Simple button to return to the simple Recordset dialog box.

2 Select the Spry table and press Ctrl-X/Cmd-X. Delete the Spry <div> element and paste the table back into the layout at the same position. 3 Clean up any residual Spry code left in the table. 4 Insert data placeholders from the new recordset into the appropriate data row cells. 5 Apply a repeat region server behavior on the data row for rs_classes. 6 Test the results in Live view.

7 Save all files. Displaying data dynamically is a huge improvement over static lists and tables. Allowing users to interact with data engages them in the process in a way that can’t be done otherwise. These exercises have given you only a small glimpse of what you can achieve with dynamic webpages. In the next exercise, you will build one of the most common dynamic applications: a master/detail page set. Adobe dreAmweAver Cs6 ClAssroom in A book

371


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.