Page 1 of 1

checkbox status

Posted: Tue Feb 26, 2008 1:48 am
by thatsme
Hello,

Code: Select all

 
<script languague='javascript'>
function Test(status)
{
  alert(status);
 
  //in IE i am getting the correct status values (true or false).  In firefox, i am getting alert as undefined.
}
</script>
 
<input type='checkbox' name='check' value='1' onClick='Test(this.status);'>
 
 
in IE i am getting the correct status values (true or false). In firefox, i am getting alert as undefined.
Thanks

Re: checkbox status

Posted: Tue Feb 26, 2008 6:23 am
by thatsme
Got it. It should have been,

Code: Select all

this.checked

Re: checkbox status

Posted: Wed Feb 27, 2008 9:43 am
by pickle
Please wrap your javascript code in [syntax=javascript][/syntax] tags.
Also, if your problem is solved, please modify your original post and put [solved] in the subject line.