htmlinput-checkbox

A

Anita C

Hi,
I have a htmlinput - checkbox on a webform, i want to use javascript to
check if the checkbox is checked or not and depending on the checked value
pop up specific alerts. What javascript code should I use to achieve the
above and also which event of the htmlinput checkbox should I associate the
javascript function sdescribed above.
Thanks a lot
 
R

Rohit

hi Anita,

here is the code which you can use...

if(formname.chkInActive.checked)
alert('Checked');
else
alert('Not Checked');

Hope this helps.
Regards,
Rohit,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top