Random choices for radio button

I would like to make the choices of a radio button to show randomly every time the web page loads.

Would you please provide some approaches? Thx

Subject: Random choices for radio button

Hi

If you are talking about the selected choice,

Where “lst” is your button options list, try something like :

lst:=…;

n:=@Integer(@Elements(lst)*@Random)+1;

lst[n]

else, If you were talking about the choices themselves,

in the choice pane, use a @random too, in order to select a subset of a list…

HTH

Subject: RE: Random choices for radio button

But in fact, my radio is created by using HTML code instead of a real radio button field, that means for a radio button it is just a series text such as "

Subject: so use javascript

Subject: RE: so use javascript

Would you pls describe the solution in a more detailed way? thx

Subject: RE: so use javascript

hi

you could write some code like :

and so on (with passthru html),

or write functions in the js header of the form,

and then call them with pass-thru later.

For any help using javascript, refer to mozilla online help, or the domino designer help for the Document Object Model.

ian

Subject: RE: so use javascript

Hi, in fact, it is not so convenient for me to use “document.write”, I prefre to re-set the value of all the radio buttons. But how to get all options of a radio button with JS? And how to get its title? thx