Hello, everyone.

I have a script that will loop through all the INPUT elements of a form; if the input is a submit it will disable the submit (or enable the submit, depending upon what is passed to the function.)

I hate using eval() - I avoid it whenever I can! Is there a better way to dynamically process the ".disabled = 'true'/'false';" portion?

Code:
// a function that will (dis/en)able all submit buttons
function edSubmit(thisStatus) { // thisStatus is either "true" or "false"
	var elementArray = new Array();
	elementArray = document.bft.getElementsByTagName("input");
	thisVar = ""; arrayLength = elementArray.length;
	for(i=0;i<arrayLength;i++) {
		if(/submit/i.test(elementArray[i].type)) {
			eval("document.bft."+elementArray[i].name+".disabled = " + thisStatus + ";");
			}
		}
	}
Thanks,

^_^