7 Replies Latest reply on Feb 29, 2008 10:57 AM by (Tony_Galfano)

    How to add an ADDT page to a Spry Tabbed Panel

      Hi,

      I have a page with one ADDT form nicely packed into a Spry Tabbed Panel. There are tabs with various form fields in each panel. One of the fields in this form, buyerID, is a selct box the buyerID for the buyer table as its value. I am trying to load a separate php page, which includes an ADDT form based on the buyer table, into an additional panel and pass it the value of the buyerID field so that the Buyer panel opens the form with the buyer selected in the buyerID field.

      I think this should work and I thought I saw something about this in the docs but now can't find it anywhere.

      Any help is much appreciated and thanks in advance!

      Tony
        • 1. Re: How to add an ADDT page to a Spry Tabbed Panel
          Günter Schenk Level 4
          Hi Tony,

          please post a demo of that page somewhere so I can have a look at what you´re talking about

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: How to add an ADDT page to a Spry Tabbed Panel
            Level 1
            Hi,

            I'll get something up this afternoon for you to check out. I usually try to take it a bit easier on Fridays! I'll keep you posted.

            Thanks,

            Tony
            • 3. Re: How to add an ADDT page to a Spry Tabbed Panel
              Level 1
              Hi Gunter,

              Sorry, I've been out of town for a few days. In terms of this post, I decided it's too much trouble to figure this out and now I am working on trying to open a new browser window from the original form using a button and the open browser window behavior. It seems like I should be able to set the target form (the one that opens in the new window)to link the primary key to a form variable in the original form.

              For example, form 1 has a select box with the value buyerID. When the user selects a buyer from the list and clicks the button the new window opens with a dynamic form in it set to "primary key = form variable = buyerID. This should open the form to the record with that primary key?

              I can't seem to get this to work. Do I have to edit the javascript somehow?

              Thanks,

              Tony Galfano
              • 4. Re: How to add an ADDT page to a Spry Tabbed Panel
                Günter Schenk Level 4
                Hi Tony,

                ----
                For example, form 1 has a select box with the value buyerID. When the user selects a buyer from the list and clicks the button the new window opens with a dynamic form in it set to "primary key = form variable = buyerID. This should open the form to the record with that primary key
                ----

                I guess you´ll have to update the value of a hidden "buyerID" field using a javascript function like described on this page:

                http://cssbeauty.com/skillshare/discussion/1356/javascript-passing-value-from-an-option-to -hidden-field/

                Cheers,
                Günter Schenk
                Adobe Community Expert, Dreamweaver
                • 5. Re: How to add an ADDT page to a Spry Tabbed Panel
                  Level 1
                  Hi Gunter,

                  Thanks, that looks great. Once the hidden input field contains the value of the select how can I pass that to the new form as a parameter when the button with the new browser code attached to it is clicked?

                  Thanks again,

                  Tony Galfano
                  • 6. Re: How to add an ADDT page to a Spry Tabbed Panel
                    Günter Schenk Level 4
                    Hi Tony,

                    1. add this javascript function to the main page´s head:

                    function openWindow(form){
                    newWindow = window.open("","","menubar=1,resizable=1,width=350,height=250");
                    var buyerID = form_name.buyerID.value;
                    newWindow.location.href = "targetpage.php?buyerID="+buyerID;
                    }

                    2. add onsubmit="openWindow(this)" to the form that´s containing the hidden field "buyerID" and is supposed to open the new window.

                    3. on "targetpage.php" test the submitted hidden field value with:

                    echo $_GET['buyerID'];

                    Cheers,
                    Günter Schenk
                    Adobe Community Expert, Dreamweaver
                    • 7. Re: How to add an ADDT page to a Spry Tabbed Panel
                      Level 1
                      Hi Gunter,

                      Sorry it's been a while. I was on vacation.

                      Anyway, this worked fantastically! I was also able to customize the code for other uses.

                      Your help is, as always, much appreciated.

                      I have another post related to dependent dropdowns with spry repeat lists. Maybe you know something about spry also?