Jquery Combobox default select -


I have data from external format in the following format

  & lt; Option value = "1" & gt; GM & lt; / Options & gt; & Lt; Option value = "2" & gt; Honda & lt; / Options & gt; & Lt; Option value = "3" & gt; Ford & lt; / Options & gt; & Lt; Option value = "4" & gt; Toyota & lt; / Options & gt;   

And I'm adding it to the blankbox. But based on the values ​​in the database (eg, Ford, or GM), I must select one by default. The value in the database is the performance value coming from external system, not VALUE in the option. I can select from the options on the basis of VALUE, but how it is chosen based on the display value.

Thank you for all your help

Regards Ray

I have tested it and what is it necessary for you

$ ("# selectId") Val ($ ("#selectId option: in (Honda ')"). Val ())

In two steps 1) Find the value of the string you want to search 2) To be the selected value Set combo box for

There seems to be other solutions, but I think this is the safest crossbroker. Works in IE6 too: D

Comments