Click to See Complete Forum and Search --> : easy code needed
i need this to complete a script.
Can someone give me the script that will select option X from a dropdown menu in a form?
Cheers,
thanks Dave, much appreciated.
What do you mean by 'position'? Do you mean the position on the page or something else?
The dropdown is already created with HTML so the positioning of the dropdown is done...
I'm not sure what you mean. :( sorry, me = newbie.
options array? i havent created the options dynamically...
i dont know what u mean, the options are already created in the html.
do i have to have something in my code that will call the options in then?
like i said, i'm doing this as a complete newbie and i'm really not too clued up on what i should and shouldnt be doing.
cheers for this help,
i thought that was the case, but wasnt sure...
so how do i search the array, and do i call the option by its VALUE?
eg.
with this...<OPTION name="Robert Jones" value="bob">
would i call:
document.formName.selectName.options[bob].selected = true;
or would it be something completely different like the numeric value of that option in the array?
Cheers Dave, this help is fantastic and i'm learning loads.