Page 1 of 1

Working in FF but not IE (disabling fields)

Posted: Mon Nov 14, 2005 6:30 pm
by Lang

Code: Select all

function getOptions(){
		myForm = document.members;
		if (myForm.what.value == "Users"){
			myForm.letter.disabled = "";
			myForm.lvl.disabled = "";
		}
		else if (myForm.what.value == "Gangs"){
			myForm.letter.disabled = "";
			myForm.lvl.disabled = "disabled";		
		}else{
			myForm.letter.disabled = "disabled";
			myForm.lvl.disabled = "disabled";		
		}	
	}
What this does is when a user selects "Users" as a basis for his/her search is unlocks a letter chooser and a level chooser.
When a user selects "Gangs" in locks the level chooser and unlocks the letter chooser.
However it only works in Firefox and not Internet Explorer

Posted: Mon Nov 14, 2005 6:45 pm
by Burrito
try:

whatever.disabled = true/false;

Posted: Mon Nov 14, 2005 8:59 pm
by Lang
Thanks for the help, but that didn't seem to do it.

Posted: Mon Nov 14, 2005 9:02 pm
by Burrito
show me the updated code...