This topic is locked

Automate Radio Buttons

10/26/2010 10:56:11 PM
PHPRunner General questions
P
procheck author

Hi,
I just created some radio buttons but I must click on the search button to make it work. Do I need to use javascript to automate this or is there a way to invoke the search with PHPRunner as soon as the selection is made?
Thank-you!
Al

Sergey Kornilov admin 10/27/2010

Al,
I'm not sure I understand what you mean. Do you have an URL where we can see that?

P
procheck author 10/28/2010

The URL is:
http://www.prochecksports.com/webpool/login.php
userid: Curz0

Password: pass
CLICK on “Your Team”
On the left there is the radio button with three Positions. When I choose Defence for example,

I would like the display to only show the Defence. The only way this works is if I click on Search.
Below are my settings.

P
procheck author 11/1/2010

Have you had a chance to look at this? Fixed my picture

J
joker 11/2/2010



Have you had a chance to look at this? Fixed my picture


Can you modify the html code to this and see if it works. It is essentially submitting the page as the option is chosen. Not sure if this is what you're looking for. You have to change "PAGE" to whatever your php search page is called.

<input type="radio" name="position" value="Defence" onClick="this.form.action='PAGE_search.php';this.form.submit()" onMouseOver="style.cursor='hand'">

<input type="radio" name="position" value="Forward" onClick="this.form.action='PAGE_search.php';this.form.submit()" onMouseOver="style.cursor='hand'">

<input type="radio" name="position" value="Goaltender" onClick="this.form.action='PAGE_search.php';this.form.submit()" onMouseOver="style.cursor='hand'">


-Joker

P
procheck author 11/2/2010

My question was not so much how to do it in javascript as to "Is there already a solution within PHPRunner?". Sometimes I've worked on an alternative solution only to find out later there is something that can be done within PHPRunner. Since I've recieved no reply and you've already done some legwork on this, it won't go to waste. I'll try it out and let you know. Thanks for the reply.
Al

P
procheck author 11/2/2010

Joker,

I can't try your suggestion. You will only see that in the generated php file. It's actually built in the table_settings.php file in the include directory. It is created in an array called $fdata. It's more involved than the time I want to spend on it. Maybe down the road I will revisit this. For now it works by clicking the search button. Thanks.