3 Replies Latest reply on Jan 29, 2009 12:06 PM by (lozzer)

    dependent dropdown

      Hi,
      I need to create a search like the one here.

      http://www.pk-cabins.co.uk/index.asp

      I have the toolkit for cs3 and mxkollection & DW8

      I also have the tutorials & DB's for MXK.

      Can anyone tell me the best tutorial to learn how to create the dropdown in
      the site above?

      Any advice appreciated.

      Thanks
        • 1. Re: dependent dropdown
          Level 1
          Just worked out it's not dependent but would still ike advice on where to go <br />to do something like this.<br /><br /><br /><lozzer@adobeforums.com> wrote in message <br />news:A6ABD8520565DE1942271474FF090188@in.webcrossing.la2eafNXanI...<br />> Hi,<br />> I need to create a search like the one here.<br />><br />> http://www.pk-cabins.co.uk/index.asp<br />><br />> I have the toolkit for cs3 and mxkollection & DW8<br />><br />> I also have the tutorials & DB's for MXK.<br />><br />> Can anyone tell me the best tutorial to learn how to create the dropdown <br />> in<br />> the site above?<br />><br />> Any advice appreciated.<br />><br />> Thanks<br />><br />>
          • 2. Re: dependent dropdown
            Günter Schenk Level 4
            Hi lozzer,

            just a quick & dirty pointer ;-)

            Doing something like this actually requires the willingness to patch Dreamweaver´s standard queries, because the query conditions will have to adapt to the question whether menu 1 and/or menu 2 pass an empty value (usually the "please select..." option) or not.

            "Patching" could mean creating a sort of "conditional query" using some PHP if/else conditions, e.g.

            1. if menu 1 *and* menu 2 don´t pass any value, the query will be pretty basic, like: "SELECT* FROM tablename"

            ...otherwise...

            2.1. if menu 1 passes a value, but menu 2 doesn´t, the query will have a WHERE condition, like: "SELECT* FROM tablename WHERE" column_one equals $_POST['menu_1']

            2.2. if menu 2 passes a value, but menu 1 doesn´t, the abovementioned query needs a minor change: "SELECT* FROM tablename WHERE" column_two equals $_POST['menu_2']

            2.3. if both menus do pass a value, the fully-fledged query needs an extra AND condition, e.g.: "SELECT* FROM tablename WHERE" column_one equals $_POST['menu_1'] AND column_two equals $_POST['menu_2']

            That´s how I would do this, but beware: once you apply such conditions to DW´s queries, DW will no longer be able to "get" what you have done to it, means the patched recordset will disappear from the server behaviour´s tab and you won´t be able to insert related "dynamic text" or whatever.

            Cheers,
            Günter Schenk
            Adobe Community Expert, Dreamweaver
            • 3. Re: dependent dropdown
              Level 1
              Gunter,<br />Plenty to go on there :-)<br />Appreciate the time! Thanks<br />Lozzer<br /><Günter_Schenk@adobeforums.com> wrote in message <br />news:59b7b96b.1@webcrossing.la2eafNXanI...<br />> Hi lozzer,<br />><br />> just a quick & dirty pointer ;-)<br />><br />> Doing something like this actually requires the willingness to patch <br />> Dreamweaver´s standard queries, because the query conditions will have to <br />> adapt to the question whether menu 1 and/or menu 2 pass an empty value <br />> (usually the "please select..." option) or not.<br />><br />> "Patching" could mean creating a sort of "conditional query" using some <br />> PHP if/else conditions, e.g.<br />><br />> 1. if menu 1 *and* menu 2 don´t pass any value, the query will be pretty <br />> basic, like: "SELECT* FROM tablename"<br />><br />> ...otherwise...<br />><br />> 2.1. if menu 1 passes a value, but menu 2 doesn´t, the query will have a <br />> WHERE condition, like: "SELECT* FROM tablename WHERE" column_one equals <br />> $_POST['menu_1']<br />><br />> 2.2. if menu 2 passes a value, but menu 1 doesn´t, the abovementioned <br />> query needs a minor change: "SELECT* FROM tablename WHERE" column_two <br />> equals $_POST['menu_2']<br />><br />> 2.3. if both menus do pass a value, the fully-fledged query needs an extra <br />> AND condition, e.g.: "SELECT* FROM tablename WHERE" column_one equals <br />> $_POST['menu_1'] AND column_two equals $_POST['menu_2']<br />><br />> That´s how I would do this, but beware: once you apply such conditions to <br />> DW´s queries, DW will no longer be able to "get" what you have done to it, <br />> means the patched recordset will disappear from the server behaviour´s tab <br />> and you won´t be able to insert related "dynamic text" or whatever.<br />><br />> Cheers,<br />> Günter Schenk<br />> Adobe Community Expert, Dreamweaver