Checkbox and alert message
Hi i have what i assume is quite a simple problem. I have a checkbox that by default is checked when i user unchecks it it should show a confirm message. If the user clicks ok it stays unchecked and checked for cancel. The problem i have is if they leave the box unchecked it still gives a message if they decide to check it again i could do with not doing this.
Here's my code:
Thanks for any help
<input type="checkbox" name="newsletter" checked="checked" onclick="news();"/>
var news = confirm("Are you sure you want to avoid our special offer emails?\n\nWe promise you will not be pestered by junk mail. They inform occasionally of releases and special offers. You can unsubscribe at anytime!");
//document.forms.elements['newsletter'].checked = checkbox_status
if (news == true)
"It should do nothing here"