Watir: How could i click this radio button?

Discussion in 'Ruby' started by Maung Aung, Oct 16, 2007.

  1. Maung Aung

    Maung Aung Guest

    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-forum.com/attachment/677/mb.png

    --
    Posted via http://www.ruby-forum.com/.
    Maung Aung, Oct 16, 2007
    #1
    1. Advertising

  2. 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-javascript.html


    ~Jeremy
    --
    Posted via http://www.ruby-forum.com/.
    Jeremy Woertink, Oct 16, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    830
    Purvi T
    Oct 19, 2004
  2. Hiten
    Replies:
    1
    Views:
    620
    Vidar Petursson
    May 26, 2004
  3. Anukul Singhal
    Replies:
    1
    Views:
    167
    Charley Baker
    May 15, 2008
  4. Alex Lin
    Replies:
    1
    Views:
    347
    Eugen Ciur
    May 6, 2011
  5. Replies:
    0
    Views:
    338
Loading...

Share This Page