Dreamweaver Ajax Beta - Details :: Tips and Tricks 1

This thread was displayed: 17 times


Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.

For more information about the affected products visit: www.interaktonline.com/Support/

View Threaded Show descending
Chris Green
08-10-2006 14:37:21 GMT +2

Hi everyone

Now as most who have read my posts will realise, I am a simple old soul. Well when I get to grips with something I then write a note for myself so I can remember how to do something in later months.

If there is somewhere better than this forum, then please let me know.

Here goes. - And it will be simple! I will give examples of code rather than just theory so that people like myself can just replace the example bits with thir own equivalents.

The Scenario

1) I needed to create a panel set with a menu and Content. 

2) A parameter is passed to the panel set page when it is first opened.

3) Each state of the content panel needed this parameter in order to work.

Initial findings

1) The default content state opened correctly

2) Clicking any other menu item did not pass the parameter

3) Clicking the default state from the menu after visiting another content state did not pass the parameter.

4) Refreshing the page caused results that confused me (and I think the computer!!)

Solution to the problem

Note:  When the Panel page is first accessed the parameter is received and the Default content state works. So the Parameter value is there in the first place.

1) Create a variable from the parameter
         eg parameter looks like ?id=3826
              parameter 'collected' as $_GET['id']

              variable made  using the following code at the beginning of the file

                        <?PHP 
                               if (isset($_GET["id"])) {
                                     $The_ID = $_GET["id"];
                               }
                        ?>

2) This was then used as a parameter for each of the AJAX links in the menu.

             <p align="center"><a id="<?php echo $ctrl->link_id() ?>" href="<?php
             $ctrl->setParamValue("id", $The_ID);
             echo $ctrl->link("Rooms", "For_Business");
             ?>">For Business</a></p>

Notes

This means that the Original Parameter is trapped within the Menu default state and clicking up and down the menu items always produces the required result.

Hope that this is of use.

Chris

Home > Support > Forums > Dreamweaver AJAX Beta > Dreamweaver Ajax Beta - Details
© Adobe Systems Romania. All rights reserved.