[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Watir: How could i click this radio button?

Maung Augn

10/16/2007 6:01:00 PM

I have tried several different ways, but didn't succeed. I have a radio
button which is written in onfocus javascript. If click on it, there
should another radio button should show up. This is what html source
code looks like:

*<td colspan="2" nowrap><input type="radio" name="books_present"
value="1"><font face="arial, helvetica" size="2"><b>&nbsp;Yes
&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="books_present"
value="0">&nbsp;No</b></font></td>*

The attached picture is what it looks like after one of the button is
chosen. Could someone help?

Thanks
maung

Attachments:
http://www.ruby-...attachment/...

--
Posted via http://www.ruby-....

1 Answer

Jeremy Woertink

10/16/2007 6:26:00 PM

0

Maung Aung wrote:
> I have tried several different ways, but didn't succeed. I have a radio
> button which is written in onfocus javascript. If click on it, there
> should another radio button should show up. This is what html source
> code looks like:
>
> *<td colspan="2" nowrap><input type="radio" name="books_present"
> value="1"><font face="arial, helvetica" size="2"><b>&nbsp;Yes
> &nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="books_present"
> value="0">&nbsp;No</b></font></td>*
>
> The attached picture is what it looks like after one of the button is
> chosen. Could someone help?
>
> Thanks
> maung

Well, this belongs with the rails questions than a ruby one, but i'll
try my best. You could either do an AJAX call to update the page, or
just use css to hide the radio button and then onclick use css to show
it. Look at a few different javascrip libraries, MooTools is a good one
and so is jQuery. Here is a link I found with a google search.

http://www.practicalwebmaster.com/entries/hiding-and-showing-with-javas...


~Jeremy
--
Posted via http://www.ruby-....