Hi
I have the below functions in regular javascript creating select options. Is there a way I can do this with JQuery without having to use the form object? Perhaps storing the options as an array of json objects and parsing this in the calling function...
function populate(form)
{
form.options.length = 0;
form.options[0] = new Option("Select a city / town in Sweden","");
form.options[1] = new Option("Melbourne","Melbourne");
}
Below is how I call the function above:
populate(document.form.county); //county is the id of the dropdownlist to populate.
Many Thanks,