Solved

autosubmit forms data on checkbox action

Posted on 2003-10-23
7
485 Views
Last Modified: 2006-11-17
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"
0
Comment
Question by:alexgreen
  • 3
  • 2
  • 2
7 Comments
 
LVL 31

Assisted Solution

by:seanpowell
seanpowell earned 25 total points
ID: 9606329
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
 
LVL 33

Expert Comment

by:knightEknight
ID: 9608128
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
 
LVL 33

Accepted Solution

by:
knightEknight earned 25 total points
ID: 9608144
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Author Comment

by:alexgreen
ID: 9608828

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
 
LVL 31

Expert Comment

by:seanpowell
ID: 9608894
>> 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
 
LVL 33

Expert Comment

by:knightEknight
ID: 9611126
... so called for good reason, too.
0
 
LVL 3

Author Comment

by:alexgreen
ID: 9677659
you win
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now