Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

edit formail from submit buttion to radio buttons

Dear experts,

I have this code and i need to edit the code, so i have
two radio buttons and a submit button instead of to submit button which either subscribes to my news letter or remove the person.. can someone help me out ..

<input type="text" id="email" name="email" value="your@email.com"  class="style14" size="25" /><br />
<input type="submit" id="subscribe" name="signUp" value="Signup" />
  <input type="Unsubscribe" id="Remove" name="signDown" value="Signout" />

Open in new window

0
Sam Sung
Asked:
Sam Sung
  • 3
  • 2
  • 2
2 Solutions
 
rajvjaCommented:
<input type="text" id="email" name="email" value="your@email.com"  class="style14" size="25" /><br />
<input type="radio" id="radSub" name="radSub" value="Signup">Subscribe</input>
<input type="radio" id="radSub" name="radSub" value="Signout">Unsubscribe</input>
0
 
Sam SungAuthor Commented:
sorry i didnt elaborate my self properly ..

 these two radio buttons should work as submit buttons ,,

so when a person type email id and click on one of the radio btn, it should submit the form
0
 
jet-blackCommented:
<input type="radio" id="radSub" name="radSub" value="Signout" onclick="document.form1.submit();">Unsubscribe</input>
Change form1 with your form name.
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!

 
Sam SungAuthor Commented:
perfekt ;) thankyou guys..
0
 
rajvjaCommented:
<input type="radio" id="radSub" name="radSub" value="Signout" onclick="SubmitForm();">Unsubscribe</input>

Try this if you want to do any validation.
function SubmitForm()
{
  // any validation
  form1.submit();
}
0
 
Sam SungAuthor Commented:
thankyou guys, works charming :D
0
 
jet-blackCommented:
You're welcome.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now