[Greasemonkey] Drop down box

Bill Donnelly donnelly at snowcrest.net
Thu Sep 21 22:41:13 EDT 2006


Something like this should work. Assuming you always want to change a 
KNOWN specific array element. (here shown as "1")

form = document.forms.namedItem ("theformname");
selbox = form.elements.namedItem ("month");
selbox[1].value = "newvalue";

If the form isn't named or ID'd, then maybe?:

form = document.forms[0];


rejectpenguin wrote:
> Is it possible to refrence a drop down box on a page that is in a javascript
> form and change one of the values that you can select?
>
> The form is post and field name is month.
>   


More information about the Greasemonkey mailing list