Conditional radio button in webobjects

303 Views Asked by At

I have following code for the radio buttons:

Test.html

<table>
    <tr>
       <td>
         <webobject name=RadioButton1></webobject>  &nbsp;
         <webobject name=LocalString1>A</webobject>
       </td>
       <td>
         <webobject name=RadioButton2></webobject>  &nbsp;
         <webobject name=LocalString2>B</webobject>
       </td>
       <td>
         <webobject name=RadioButton3></webobject>  &nbsp;
         <webobject name=LocalString3>C</webobject>
       </td>    
    </tr>
 </table>

Test.wod

RadioButton1: WORadioButton {
    name = "type";
    selection = requestType;
    value = 0;
}


RadioButton2: WORadioButton {
    name = "type";
    selection = requestType;
    value = 1;
}


RadioButton3: WORadioButton {
    name = "type";
    selection = requestType;
    value = 2;
}

I have following webbjects to show : A, B & C

<webobject name=A></webobject>

<webobject name=B></webobject>

<webobject name=C></webobject>

Question is:

I want to show the webobject A when user select the RadioButton1, B when select RadioButton2 & C when select 3.

What condition I apply to the radio button and How ?

1

There are 1 best solutions below

0
On

Is there a reason you are not using Project Wonder?

Is sounds like you need an AjaxObserveField to watch the button and fire the update. This requires Wonder!

http://wiki.wocommunity.org/dashboard.action

there are Ajax examples that would really help.

this link may help with installing wonder:

http://wiki.wocommunity.org/display/WEB/Project+Wonder+Installation