autosubmit forms data on checkbox action

easy one

just want to automatically submit data from a checkbox if it is left unticked, and then if it is ticked, submit a "no thanks"
or is it better to make the user "uncheck" the box to "not recieve additional promotions"
LVL 3
alexgreenAsked:
Who is Participating?
 
knightEknightCommented:
and to ask them to verify their choice:

<INPUT type="checkbox" name="subscribe" value="whatever"  
     onclick="if(this.checked==true)if(confirm('Are you sure?'))this.form.submit();" />
0
 
seanpowellCommented:
It's better to ask the user to "check" the box "if" they want additional promotions. Having someone sign up for something that they didn't explicitly ask for is not a good idea....
0
 
knightEknightCommented:
I agree, better to ask them to check the box to be included.  Here is how you can do that:

<INPUT type="checkbox" name="subscribe" value="whatever"  onclick="if(this.checked==true)this.form.submit();" />
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
alexgreenAuthor Commented:

bear in mind the page is for solicitors, I think they are wanting to try to get more people to allow them to send them messages and therefore to them, Having someone sign up for something that they didn't explicitly ask for is a very good idea.  Hence the question i asked.

thanks for ideas so far but i will pursue the original intention and award points for correct answers with the current criteria.
0
 
seanpowellCommented:
>> Having someone sign up for something that they didn't explicitly ask for is a very good idea.

I'm sure it would be, but it's also considered to be illegal, and generates what we call SPAM.
0
 
knightEknightCommented:
... so called for good reason, too.
0
 
alexgreenAuthor Commented:
you win
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.