...

View Full Version : Disabling Form All Elements?



angst
05-04-2006, 02:24 PM
Hello,
I know how to disable a single form element, but I'm wondering if there is a way to gray out a entire form at all once without having to specify each form field.

thanks in advance for your time!
-Ken

Kor
05-04-2006, 04:39 PM
function disableEl(){
var el = document.forms['formname'].elements;
for(var i=0;i<el.length;i++){el[i].disabled=true}
}

angst
05-04-2006, 04:50 PM
kool, that works

thanks!
-Ken



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum