Solved

autosubmit forms data on checkbox action

Posted on 2003-10-23
7
529 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

 
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

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

635 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