Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable ALL Form Buttons 1

Status
Not open for further replies.

Mugs321

Programmer
Jan 31, 2007
49
CA
Hey all,

I wish to disable all buttons on my page. I would like to do this without disabling all my 'INPUT' elements and without referencing their names as some of them change dynamically.

I got as far as:
Code:
els = document.form1.getElementsByTagName("INPUT");
for (i=0; i<els.length; i++){
  els(i).disabled=true;
}
Now, is there any way to isolate the 'type' attribute and only disable those with a 'type' of 'button'?
 
boy... do I ever feel sheepish... thx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top