I have drop down list with four values: value1-4 User is can get to that page by clicking one of four links that are related to values in drop down. Link1->Value1 etc
Now each of the links pointing to that page contains variable ([url]http://.......icon=value1[/url])
I would like value in drop down on page load to auto select depending on url. How can I do that?
thanks

    How is the dropdown HTML code generated, i.e. is it dynamic or static? The general idea would be: for each option in the dropdown, check if that option's value is equal to the value the user previously selected and, if it is, output the necessary HTML (e.g. selected="selected") to make that option be selected by default.

      be more specific, give us examples what do you expect.

        5 days later

        "selected" should work in HTML documents while "selected" is wrong for XHTML documents and in the XHTML serialization of HTML 5 where it should be 'selected="selected"'. Still, both FF and Chrome works fine with simply "selected" on OSX, not only using 4.01 doctype as specified above (which as I understand it has no bearing on documents served in an HTML 5 browser since they will treat those as HTML 5 docs anyway - most likely with the exception of IE - and most likely with options to "downgrade" behaviour to that of others...) but also with HTML 5 wether serialized as html or xml.

          Write a Reply...