Solved

autosubmit forms data on checkbox action

Posted on 2003-10-23
7
496 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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)

919 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

20 Experts available now in Live!

Get 1:1 Help Now