Click to See Complete Forum and Search --> : getElementById question


yaron
09-16-2003, 05:41 AM
Hello all,
I have a bunch of checkboxs under the same name but different id.
I want to write a function that gets an id and checks if the specified checkbox is checked or not
is that possible with getElementById? if yes how and if no so what can i do?
Thanks

Fang
09-16-2003, 05:52 AM
if(document.getElementById(theID).checked==true) {
//do something
}

yaron
09-16-2003, 06:02 AM
and thanks again