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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable form elements

Status
Not open for further replies.

tyris

Programmer
Nov 2, 2000
311
FR
hi all,

for the moment i do have a style this way :

.HID {
visibility : hidden;

}

i'd like to replace it by disable in stead of hidden. what is the css code i must do ? (something like <INPUT type=radio value=BODY name=RTI disabled> but i css) Best regards X-),
Elise
 
hi
i dont think it is possible via css, but here is javascript solution:
function disableRadios(){
var obj=document.forms.formname.elements
for (ii=0; ii<obj.length; ii++){
if (obj[ii].type=='radio'){
if (obj[ii].name.substr(0,1)=='a') obj[ii].disabled=true
}
}


just call ur radios 'a...' (beginin from 'a' letter) regards, vic
 
thanks that will be enought :) Best regards X-),
Elise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top