
November 18th, 1999, 08:40 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
I'm not sure about disabling the button, but one thing you can do is to make a for loop which checks to see if it has a value, and if it doesn't, display a message and not do anything until all fields are filled.
Here's an example:
var filledField;
for (var i = 0; i < document.yourForm.elements.length; i++) {
if (document.yourForm.yourTextbox != "") {
filledField++;
}
if (filledField < numberOfFields) {
alert("Please fill out all fields before continuing");
}
else
{
//What you want to do when the field is //filled
}
Hope this helps.
-James
Bucachacha@aol.com
|