?
Solved

Using a radio option to trigger form submit.

Posted on 2007-04-03
4
Medium Priority
?
263 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
[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
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
ThinkPaper earned 200 total points
ID: 18844957
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
ID: 18845392
<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
ID: 18849110
That was so easy I feel silly !
0
 
LVL 16

Expert Comment

by:ThinkPaper
ID: 18850792
ah.. everyone has brain farts sometimes =)
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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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…
Suggested Courses

801 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