8 Replies Latest reply on Mar 10, 2008 9:16 AM by Günter Schenk

    ADDT Dependent Dropdown SB with Spry Repeat Lists

    Level 1
      Hi,

      I first want to say that this forum is fantastic and full of very bright folks willing to help us not so bright types.

      Next, of course, I have a problem. I'm using spry repeat lists as dropdowns in a form. There are 3 that need to be dependent on each other. I had been using the ADDT dependent dropdown SB and it works great for normal selects. It doesn't seem to work at all on spry repeat lists. I was hoping these two would play nicely together, and maybe they do and there's some trick to this.

      If the ADDT SB's don't work with Spry repeat lists, maybe there's a way to do this using javascript?

      Thanks in advance for any help,

      Tony Galfano
        • 1. Re: ADDT Dependent Dropdown SB with Spry Repeat Lists
          Günter Schenk Level 4
          Hi Tony,

          a huge problem I see with trying to use Spry´s dependant dropdown menus in conjunction with ADDT is :: apart from being created *from* externally defined recordset values (e.g. the XML file), the list options don´t have any binding to your database.

          You might in theory be able to use them on your Insert Record pages, but whenever you´re going to implement them on your Update Record pages, you´ll note that they don´t provide any mechanism which is capable to check which of the list´s options has previously been stored in the table and display this one as SELECTED -- what I´m talking about, is the regular ADDT code for menu options:



          Spry´s dependant dropdown menus don´t have that "check against the table" feature, and this makes it practically useless at least on your Update Record pages.

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: ADDT Dependent Dropdown SB with Spry Repeat Lists
            Level 1
            Hi Gunter,

            The reason I'm using them at all is that I'm trying to use the Spry Data Utilities Toolkit extension to refresh the dropdowns after adding data to the recordset. You probably remember that discussion from earlier. It actually works well with the repeat lists. But you're right, that code is gone.

            I'm still hoping that I can figure something out that will work so that the form won't have to be refreshed everytime.

            Is there a way to add the database checking code to a spry repeat list so that it will work like an ADDT dropdown?

            The other thing is that efven if that is possible the dependent dropdown SB doesn't seem to work on the repeat lists anyway?

            Thanks,

            Tony
            • 3. Re: ADDT Dependent Dropdown SB with Spry Repeat Lists
              Günter Schenk Level 4
              Hi Tony,

              ----
              Is there a way to add the database checking code to a spry repeat list so that it will work like an ADDT dropdown?
              ----

              you would have to add that to the XML file. But when this XML is dynamically generated (e.g. by using ADDT´s XML Export server behaviour), the problem is you´d have to embed PHP code inside PHP code, and ... well, guess what a mess you´re dealing with then ;-)

              ----
              The other thing is that efven if that is possible the dependent dropdown SB doesn't seem to work on the repeat lists anyway?
              ----

              More info please :: do the dependent dropdown menus fail to pick up the correct value, or what happens exactly ?

              Cheers,
              Günter Schenk
              Adobe Community Expert, Dreamweaver
              • 4. Re: ADDT Dependent Dropdown SB with Spry Repeat Lists
                Level 1
                Hi Gunter,

                Thanks for the help. I've decided, based on your accurate assessment of the work involved in getting all this to work with spry, to ditch that and just refresh the damn page after all new entries are made. I appreciate your help, probably saved me many hours.

                I do have a wierd issue with the ADDT editaqble dropdown behavior. I actually use this one a lot and it always works well. I have one dropdown that only showsw the first 2 characters of the contents. A swcreenshot is avaiable here: http://www.zenwebguru.com/editabledropdown.jpg

                All of the other editable dropdowns on the page, and the site, work fine, but this one is shruken for some reason. I'm wondering if there is a size limitation in the css or the js that can't handle larger records? The largest field in the table contains the value:

                "Flat Guarantee; Purchaser to provide one Fender Amplifier (see rider for list of amps) at no cost to Artist."

                This really shouldn't present a problem, but maybe it's something else?

                Thanks, as always for your great help.

                Tony
                • 5. Re: ADDT Dependent Dropdown SB with Spry Repeat Lists
                  Günter Schenk Level 4
                  Hi Tony,

                  -----
                  I have one dropdown that only showsw the first 2 characters of the contents
                  -----

                  ADDT´s editable dropdown menus usually display more than 2 chars, and to my knowledge there´s no in-built char number restriction which could cause that.

                  However, the editable dropdown menus do internally use some AJAX functionality, and it might well be that a special character within some string like a semicolon (Flat Guarantee;) will break something -- that´s actually just an assumption, so please test it yourself by replacing that semicolon with a standard comma and see it works better

                  Cheers,
                  Günter Schenk
                  Adobe Community Expert, Dreamweaver
                  • 6. Re: ADDT Dependent Dropdown SB with Spry Repeat Lists
                    Level 1
                    Hi Gunter,

                    Yes, I tried that already and no dice. I even deleted the % signs. I also tried adding an inline style (style="width:200px")and that didn't work either. I'm still looking into the css styles for an answer. Very strange that the longer more involved records would break this.

                    Anyway, let me know if you come up with anything else. These widgets are also impossible to style. I've tried everything and can't get rid of the borders around the select box. I guess I'll have to live with them.

                    Anyway, thanks again and if you find anything that would be great.

                    Tony
                    • 7. Re: ADDT Dependent Dropdown SB with Spry Repeat Lists
                      Level 1
                      Hi Gunter,

                      Just thought I'd add to this that I just tried adding a few more editable dropdowns in the same spry tabbed panel as the one with the shrunken one and got the same problem. When I move that editable dropdown to the first tab in the tabbed panel it works fine. If I move it to any other tabbed panel other than the first one I get the same shrunken select problem. So, it must have something to do with the spry tabbed panels.

                      The tabbed panels are in a table row and each tabbed panel contains a table with form fields in it. The form tag surrounds the entire table including that includes the tabbed panel widget. All of the head tags look right. I'm not sure what's going on here, but maybe that helps you to figure this out.

                      Thanks,
                      • 8. Re: ADDT Dependent Dropdown SB with Spry Repeat Lists
                        Günter Schenk Level 4
                        Hi Tony,

                        thanks for sharing this observation !

                        ------
                        All of the head tags look right. I'm not sure what's going on here, but maybe that helps you to figure this out
                        ------

                        I personally don´t know enough about SPRY internals in order to provide a reasonable answer, and I still think that SPRY and ADDT are sort of "different animals", so to speak.

                        SPRY is still in beta, and its interoperability with other non-ajax frameworks such as ADDT is not documented and seems - assumingly - untested. In other words :: I´m not gonna look into that, it´s definitely over my head :-)

                        Cheers,
                        Günter Schenk
                        Adobe Community Expert, Dreamweaver