Solved

Using a radio option to trigger form submit.

Posted on 2007-04-03
4
256 Views
Last Modified: 2012-05-05
Hi All,
I have a form which also displays details of database records.
I have added a radio group to control the display of the form.
How can I get the form to submit when one of the radio options in the group have been pressed ? This is to replace the standard submit button.

Many thanks.
0
Comment
Question by:chunky1
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
ThinkPaper earned 50 total points
Comment Utility
you should be able to use 'onclick' inside your radio buttons..

<input type="radio" onclick="document.formName.submit();">
0
 
LVL 8

Expert Comment

by:jawahar_prasad
Comment Utility
<html>
<head>
<title>Submit Tutorial</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="a.html">
  <input name="radiobutton" type="radio" value="radiobutton" onclick="javascript: submit();" />
</form>
</body>
</html>
0
 
LVL 1

Author Comment

by:chunky1
Comment Utility
That was so easy I feel silly !
0
 
LVL 16

Expert Comment

by:ThinkPaper
Comment Utility
ah.. everyone has brain farts sometimes =)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

744 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

9 Experts available now in Live!

Get 1:1 Help Now