...

View Full Version : Resolved Setting selectedIndex not working in IE8



Maguire
07-01-2012, 06:15 PM
Does anyone know why this would be working in Firefox but not in IE8?

document.getElementById("myFormID").selectedIndex = 0;

This script runs on page reload to reset the form values to their defaults.

Susan

Nile
07-01-2012, 06:22 PM
Try .options.selectedIndex

Keep in mind, you can use .reset() to reset a form just as type="reset" will do.


document.forms[0].reset();

Maguire
07-01-2012, 06:25 PM
Oh wonderful! Thanks.

Nile
07-01-2012, 07:11 PM
No problem :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum