It seems you don't know what .select() should be used for. It has absolutely nothing to do with selecting and option of a select box. Read the docs carefully. http://docs.jquery.com/Events/select
Try this instead (assuming that #country_id is a select box): $jQ("#country_id]").value(my_value) ocptime wrote: > Hello There, > > I want to dynamically add a select option to an existing select > dropdown when a new country is added. This i was able to do using: > > $jQ("#country_id option[value='new']").before("<option value='" + > value + "'>"+ name + "</option>"); > > After that i want to get selected the just now appended country option > and must change from the "--New Country--" . For that i used the select > () as below: > > $jQ("#country_id option[value='" + value + "']").select(); > > This seems to be not working. > > Even if i put a static value this is not changing: > > $jQ("#country_id option[value='144']").select(); > > Any pointers ? > > Thanks in Advance, > > Regards > ocptime