Probably very simple, but I have an AJAX script thats creating a feed that is used to create a Select Box on the fly, here's the output of the script...
obj.options[obj.options.length] = new Option('- Select a Province -','');
obj.options[obj.options.length] = new Option('Cabrera','13');
obj.options[obj.options.length] = new Option('Formentera','14');
obj.options[obj.options.length] = new Option('Ibiza','15');
obj.options[obj.options.length] = new Option('Mallorca','16');
obj.options[obj.options.length] = new Option('Menorca','17');
My question - I have a PHP variable that I want to use to add a 'Selected' to one of the above new Options, but my variable is the value (the numeric in the value above), what do I need to add to this output above to make that specific option selected?
Thanks!