defaulty selecting one radio button

i have 2 radio buttons, when the time of form load one must checked defaulty.

tags are

<html:radio property="exporttype" value="ascii"/><bean:message key="app.ascii"/>

<html:radio property="exporttype" value="csv"/><bean:message key="app.csv"/></td>

how to do this in java script

thanks in advance

[365 byte] By [RaviKumar.Avulaa] at [2007-11-27 7:50:24]
# 1
add checked="checked" to one of your raido button. If it dosen't work after form loads, create a js fn and call it body onload.function setSelected() {document.getElementById('exporttype')[0].value = true;}
skp71a at 2007-7-12 19:31:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
checked="checked" is not working in struts, it is working in normal html. the js fuction also not working
RaviKumar.Avulaa at 2007-7-12 19:31:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
put checked = true;document.getElementById('exporttype')[0].checked = true;
skp71a at 2007-7-12 19:31:27 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...