JSB
09-26-2002, 04:50 AM
New guy here.
I'm working on a script that will simply take the numher of forms on any page and then loop through disabling the submit and view buttons.
I wrote a (well would like to write) a function that I can call within the functions I currently have to disable the buttons.
All my script works separtely but not together.
When I add the following, it gives me "is null or is not an object".
function disbuttons(){
numForms = document.forms.length;
for (x=0;x<numForms;x++){
document.forms[x].mySubmit.disabled = true;
document.forms[x].myView.disabled = true;
}
}
Please help. I'm the kind of person that won't ask unless I have tried everything I know to try and then some.
Thanks.
I'm working on a script that will simply take the numher of forms on any page and then loop through disabling the submit and view buttons.
I wrote a (well would like to write) a function that I can call within the functions I currently have to disable the buttons.
All my script works separtely but not together.
When I add the following, it gives me "is null or is not an object".
function disbuttons(){
numForms = document.forms.length;
for (x=0;x<numForms;x++){
document.forms[x].mySubmit.disabled = true;
document.forms[x].myView.disabled = true;
}
}
Please help. I'm the kind of person that won't ask unless I have tried everything I know to try and then some.
Thanks.