Complete the main panel with its states

What is left to do in order to complete the site is to edit each of the five main panel (Content) states:

  1. Default

  2. MX AJAX Toolbox

  3. News

  4. Portfolio

  5. Contact

Edit the Default state

To make it editable, click the Content (default state) item in the AJAX Panels tab of the Files panel. In the index page, in Design view, click inside the default Content panel state. Change the title from Content to Home, and then replace the sample text below the title with:

----------

This tutorial site is built with MX AJAX Toolbox. Notice how only the main panel refreshes, independently and asynchronously, when you click one of the menu items on the left.

Look around, and you will notice various AJAX elements:

----------

Save the changes.

Edit the MX AJAX Toolbox state

To make it editable, click the Content/MX AJAX Toolbox item in the AJAX Panels tab of the Files panel. In the index page, in Design view, click inside the MX AJAX Toolbox panel state, and then follow the steps below:

  1. Remove the "Content :: " part from the title, as well as the sample text below the title (triple-click in that paragraph to select it, and then press Delete).

  2. Press Enter to create a second empty paragraph below the title.

  3. Switch to Code view and replace the second <p>&nbsp;</p> code section with:

    <div style="width: 378px; margin-left: 30px;"></div>

                                         
    This way, you are creating a container for the AJAX tabset that you are adding here so that it won't display right next to the orange border, but a little to the right.

  4. Place the cursor right before </div> and then switch back to Design view.

  5. Apply the AJAX Tabset Wizard from the MX AJAX Toolbox tab of the Insert bar. The wizard has two steps.

  6. Configure the first step of the AJAX Tabset Wizard as shown below:


                                         

  7. In the second step of the AJAX Tabset Wizard you get to specify the titles and filenames for the tabset regions:


                                         

  8. Notice the corresponding translator added in page. Since the tabset content comes from external files, you cannot click each of the tabs in the translator and edit its region. To edit the regions, you will use the associated Property Inspector.

  9. Click anywhere inside the tabset translator and notice the property inspector displayed in the lower part of the Dreamweaver interface:


                                         

  10. With the Overview item selected in the Display Tab drop-down menu, click the Open Tab File button. The overview file will open. Replace the default text ("Overview" region content here) with:

----------

MX AJAX Toolbox is a set of tools that allows you to build AJAX-driven websites from scratch, or add AJAX functionality to existing websites. It is an intuitive visual environment for rapid application development. It will allow web developers and designers alike to quickly empower their web applications with AJAX technique, without any hand-coding.

Notable features:

----------

 

  1. Place the cursor at the beginning of the new text, and proceed similar to here (steps 1-3) to insert the logo_MX_AJAX_Toolbox.png image from the logos folder in the site root.

  2. With the image selected, switch to Code view. In the selected code, press Space right after the opening <img tag, and add the following code section (before the  src attribute):

    style="margin: 0 10px 10px 0; float: left;"

                                         
    This will allow the text to be displayed next to the image, and at the same time providing some space between the two.

  3. Save the overview file and close it.

  4. Back to the index page, having the tabset selected, choose the Features item in the Display Tab drop-down menu, and click the Open Tab File button. The features file will open. Replace the default text ("Features" region content here) with:

----------

----------

 

  1. Save the features file and close it.

  2. Back to the index page, having the tabset selected, choose the Benefits item in the Display Tab drop-down menu, and click the Open Tab File button. The benefits file will open. Replace the default text ("Benefits" region content here) with:

----------

----------

 

  1. Save the benefits file and close it.

In the Files tab of the Files panel, notice these three new files in the site structure (they were automatically generated by the AJAX Tabset Wizard):

 

After following the steps above, the index page in Dreamweaver, in Design view, should look like this (regarding the MX AJAX Toolbox state of the Content panel):

 

Save the index file and upload it to the server. You can preview it in browser (press F12) if you want to. Click the MX AJAX Toolbox link in the menu on the left to see the AJAX tabset at work.

Note: In Dreamweaver, you can also click the Preview in browser icon in the Insert bar, and the current/visible states in each panel will be previewed in browser.

Edit the News state

To make it editable, click the Content/News item in the AJAX Panels tab of the Files panel. In the index page, in Design view, click inside the News panel state, and then follow the steps below:

  1. Remove the "Content :: " part from the title, as well as the sample text below the title (triple-click in that paragraph to select it, and then press Delete).

  2. Create a recordset to retrieve information about news. Go to the Application panel, Bindings -> + -> Recordset (Query). Configure the window that opens as shown below:


                                         

  3. Expand the rsNews recordset in the Bindings tab of the Application panel, and drag and drop the title_nws column in the empty paragraph below the News title. Once dropped in page, it is selected. Press the right arrow key to position the cursor right after this dynamic text, and then press Shift+Enter to create a new line in the paragraph.

  4. On the new line drag and drop the description_nws column from the same recordset.

  5. Having this dynamic text selected, click the Unordered List button in the Property Inspector.

  6. Select the <li> (list item) tag in the Tag Selector, and then click the Repeated Region icon in the Application tab of the Insert bar. Configure the window that opens as shown below:


                                        

  7. Before transforming the news title into an AJAX link, you have to create a new state in the Content panel where the news body will be displayed (and the link will point to this state). In order to add a new panel state, you have to be in the master page. Right-click anywhere inside the News panel state, and from the contextual menu that pops-up, select the AJAX Panels/Go to Master Page option:


                                        

  8. Now that you are in the master page, the Add State button from the MX AJAX Toolbox tab in the Insert bar is active. Click that icon and configure the window that opens as shown below:


                                       

  9. Once the state is created, you are automatically redirected to it and you can edit it. So since you are there, edit the NewsBody state right now.

  10. First of all, create a recordset. Proceed as above, with the following differences:


                                       

  11. Select the state title (Content :: NewsBody). Expand the rsNewsBody recordset in the Bindings tab of the Application panel, and drag and drop the title_nws column on top of the selected title.

  12. Remove the sample text below the title (triple-click in that paragraph to select it, and then press Delete). In the empty paragraph type [Published on: ]. Drag and drop the date_nws column from the rsNewsBody recordset before the closing bracket "]".

  13. In a new paragraph below this one drag and drop the body_nws column from the same recordset.

  14. Create one more paragraph and type: Back to News List. Select this text section and click the Align Right button in the Property Inspector. You will transform this text into an AJAX link to the News state in the Content panel.

  15. Having the text selected, apply the AJAX Link server behavior from the Application panel, Server Behaviors -> + -> MX AJAX Toolbox. The dialog box has two tabs. In this situation, you only need to configure the first one:


                                      

  16. There is one more thing that you should do before completing the NewsBody state. Since it will display different content depending on the id_nws URL parameter value, it would be useful if the page title in browser will show the current news title. To accomplish this, access the AJAX Meta server behavior from the Application panel, Server Behaviors -> + -> MX AJAX Toolbox. Configure the window that opens as shown below:


                                      

  17. Save your work in the NewsBody state, and go back to the News state - click the Edit Panel States icon from the MX AJAX Toolbox tab in the Insert bar, and from the options that pop-up, select Content - News:


                                    

  18. The News state will open. Select (single-click) the {rsNews.title_nws} dynamic text. Apply the AJAX Link server behavior from the Application panel, Server Behaviors -> + -> MX AJAX Toolbox. The dialog box has two tabs.

  19. Configure the first tab (Basic) of the AJAX Link server behavior as shown below:


                                   

  20. In the second tab (Advanced) of the server behavior you get to specify the URL parameters passed:


                                  

In the Files tab of the Files panel, notice one new file in the site structure (it was automatically generated when you created a new panel state, NewsBody):

 

After following the steps above, the index page in Dreamweaver, in Design view, should look like this (regarding the News state of the Content panel):

 

Save the index file and upload it to the server. You can preview it in browser (press F12) if you want to. Click the News link in the menu on the left to see the AJAX links and tooltips at work.

Note: In Dreamweaver, you can also click the Preview in browser icon in the Insert bar, and the current/visible states in each panel will be previewed in browser.

Edit the Portfolio state

To make it editable, click the Content/Portfolio item in the AJAX Panels tab of the Files panel. In the index page, in Design view, click inside the Portfolio panel state, and then follow the steps below:

  1. Start with the first four instructions from the Content/MX AJAX Toolbox panel state.

  2. Apply the AJAX Photo Gallery command from the MX AJAX Toolbox tab of the Insert bar. The dialog box has two tabs.

  3. Configure the first tab (Basic) of the AJAX Photo Gallery command as shown below:


                                         

  4. Configure the second tab (Advanced) of the AJAX Photo Gallery command if you want to display a short description for each photo (as a tooltip). The description and the corresponding image filename should be stored in an XML file:


                                        

  5. Notice the corresponding translator added in page. One of the images in the folder is retrieved and displayed in the photo box, and the same image is displayed as thumbnails in the navigation bar.

After following the steps above, the index page in Dreamweaver, in Design view, should look like this (regarding the Portfolio state of the Content panel):

 

Save the index file and upload it to the server. You can preview it in browser (press F12) if you want to. Click the Portfolio link in the menu on the left to see the AJAX photo gallery at work.

Note: In Dreamweaver, you can also click the Preview in browser icon in the Insert bar, and the current/visible states in each panel will be previewed in browser.

Edit the Contact state

To make it editable, click the Content/Contact item in the AJAX Panels tab of the Files panel. In the index page, in Design view, click inside the Contact panel state. Remove the "Content :: " part from the title, and then replace the sample text below the title with:

----------

Web address: http://www.interaktonline.com/

E-mail: contact@interaktonline.com

Address: 1-11 Economu Cezarescu ST, AYASH Center, 1st floor, Sector 6, ZIP 060754, Bucharest, Romania

Phone: +4021 312.51.91

Fax: +4021 312.53.12

----------

Save the changes.

 

Finally, the site is completed! This is how it should look in browser:

 

Use the menu on the left to navigate through all the pages you created, and notice how only the main panel refreshes. Do not forget to check out the AJAX tabset in the MX AJAX Toolbox page, the AJAX links and tooltips in the News page, the AJAX photo gallery in the Portfolio page, and the AJAX collapsible region and AJAX accordion in the site third column.