Solved

Make from action occur from button

Posted on 2000-05-18
3
231 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 100 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…

688 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