Text displayed near radio button is not really property of radio button, it
is just some text in the near.

But, in this case you can get all text from the cell with radio buttons like
this (this is irb output)

irb(main):014:0> ie.table(:index,1)[1][2].to_s
=> "Stepper  C/D"

You can split this text into array:

irb(main):015:0> ie.table(:index,1)[1][2].to_s.split
=> ["Stepper", "C/D"]

This will give you text near first and second radio button:

irb(main):018:0> ie.table(:index,1)[1][2].to_s.split[0]
=> "Stepper"
irb(main):017:0> ie.table(:index,1)[1][2].to_s.split[1]
=> "C/D"

Not an elegant solution, but it is a start. I hope it helps.

Zeljko

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hue Mach Dieu
Sent: Friday, July 29, 2005 4:09 AM
To: [email protected]
Subject: [Wtr-general] Get Radio Button Text?

Dear All
How can I get this Radio Button Text (in this case is Stepper or C/D)

The HTML code as below

..
<tr> 
      <td class="sitem">Type</td>
      <td> <input type="radio" name="kind" value="0"
onClick="change_kind();" checked>
        Stepper 
        <input type="radio" name="kind" value="1"
onClick="change_kind();">
        C/D </tr>
    <tr>
...

Thank for help

Hue


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to