?
Solved

Make from action occur from button

Posted on 2000-05-18
3
Medium Priority
?
232 Views
Last Modified: 2010-04-09
I have table within a form. In the last column of the table I have a radio button for each row, each associated with a value for that row. When the user clicks a radio button and then presses the submit button then next page is generated from the database. This works, however the table often has many screens of data and if the selected item is near the bottom of the table the user must then scroll to the top to press the submit button. Inconvenient !
What I would like to do is replace the radio button with an ordinary button that will execute the action normally associated with the submit button. I can then have one button per row of the table.

Thanks
0
Comment
Question by:nhoj
[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 Comments
 
LVL 3

Expert Comment

by:dplambert
ID: 2821253
I assume that by clicking on the radio button for a given row, it passes an identifier for the row to the next page, like rowID.

One thing you can do is simply use a link to call the page, but you specify the rowID in the URL for each row:

<a href="detailed_data.cgi?rowID=123">Detail</a>

The next row would be:

<a href="detailed_data.cgi?rowID=124">Detail</a>

Obviously, the you would print this out using your CGI program. This is a quick HTML solution. You can access that rowID in your CGI program for detailed_data.cgi.
0
 
LVL 1

Expert Comment

by:cbeattie
ID: 2821309
Why not just put another submit button at the bottom of the page.  You can have multiple sumbit buttons.  Or just put one by each radio button.  There is a way to make the radio button selection trigger a submit, but it involves a javascript and I do not know the details of how to implement it.
0
 
LVL 8

Accepted Solution

by:
xabi earned 400 total points
ID: 2821323
Just change your radio button into this
<input type="button" onclick="this.form.buttonpressed.value='what_you_want';this.form.submit()">

and add this field inside the form:
<input type="hidden" name="buttonpressed">

xabi
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
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)
Suggested Courses

770 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