Solved

autosubmit forms data on checkbox action

Posted on 2003-10-23
7
519 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

756 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