How to pre select Radio Button In Struts

Hi,

I have two radio buttons

1. Deposit

2. Account

i want the first one i.e deposit to be selected by default.This can be done by writing checked in jsp.

Now if i choose second option viz account and an error comes on that so i am displaying the same page to user with all the fields in editable mode,

But in that case the second option button must be selected as my user selected the second one...

I am not getting any other solution to select a option button by default

[521 byte] By [Kanikaa] at [2007-10-3 4:58:07]
# 1
http://jguru.com/forums/Struts
CeciNEstPasUnProgrammeura at 2007-7-14 23:03:29 > top of Java-index,Java Essentials,Java Programming...
# 2
hi , try this. while loading the form call the onload method and in that method try to check the radio button using, document.forms[0]......=checked;
murtya at 2007-7-14 23:03:29 > top of Java-index,Java Essentials,Java Programming...