<DIV>Hi,</DIV>
<DIV>I am facing a problem in the following:</DIV>
<DIV>&nbsp;</DIV>
<DIV>There are two radio buttons within &lt;form&gt; tag. Initially none of the radio buttons is selected by default.<BR>&nbsp;<BR>Now if any button (e.g. Football) is selected by user then after clicking on Submit button the radio button 'Football' should be shown as checked. (Code is given below)</DIV>
<DIV>&nbsp;</DIV>
<DIV>Note that there is one query string 'Qstring' which returns the value, if any, that was provided by the user when they clicked 'submit'. </DIV>
<DIV>&nbsp;</DIV>
<DIV>This means </DIV>
<DIV>&nbsp;</DIV>
<UL>
<LI><FONT color=#7f003f>If the user clicks on 'Football' button it will come as 'Qstring=FOOT' and for 'Cricket' it is 'Qstring=CRIC'.</FONT></LI>
<LI><FONT color=#7f003f>When there is a value in the Qstring argument (i.e FOOT/CRIC), then the corresponding radiobutton should be checked when the form is presented again.<BR></FONT></LI></UL>
<DIV><U>This is the html code:</U></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#0000ff>&lt;form name="form1"&gt;</FONT></DIV>
<DIV><FONT color=#0000ff></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff>&lt;input type="radio" name="rd" value="FOOT"/&gt;Football<BR>&lt;br /&gt;<BR>&lt;input type="radio" name="rd" value="CRIC"/&gt; Cricket</FONT></DIV>
<DIV><FONT color=#0000ff>&nbsp;&lt;input type="Submit" value="Submit" /&gt;</FONT></DIV>
<DIV><FONT color=#0000ff></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff>&lt;/form&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><U>JavaScript Code:</U></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#0000ff>function on_submit()</FONT></DIV>
<DIV><FONT color=#0000ff>{ </FONT></DIV>
<DIV><FONT color=#0000ff>var qry=location.search.substring(1,location.search.length);</FONT></DIV>
<DIV><FONT color=#0000ff>var aa=qry.indexOf('Qstring=');</FONT></DIV>
<DIV><FONT color=#0000ff>alert(aa);</FONT></DIV>
<DIV><FONT color=#0000ff>if(aa!=-1)</FONT></DIV>
<DIV><FONT color=#0000ff>{</FONT></DIV>
<DIV><FONT color=#0000ff>var ss=qry.substring(aa+11,aa+17);</FONT></DIV>
<DIV><FONT color=#0000ff>alert(ss);</FONT></DIV>
<DIV><FONT color=#0000ff>if(ss=="FOOT")</FONT></DIV>
<DIV><FONT color=#0000ff>{</FONT></DIV>
<DIV><FONT color=#0000ff>form1.rd[0].checked=True;</FONT></DIV>
<DIV><FONT color=#0000ff>}</FONT></DIV>
<DIV><FONT color=#0000ff>else</FONT></DIV>
<DIV><FONT color=#0000ff>{</FONT></DIV>
<DIV><FONT color=#0000ff>form1.rd[1].checked=True; </FONT></DIV>
<DIV><FONT color=#0000ff>}</FONT></DIV>
<DIV><FONT color=#0000ff>}</FONT></DIV>
<DIV><FONT color=#0000ff>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>I am calling the function 'on_submit()' from <FONT color=#0000ff>&lt;input type="Submit" value="Submit" onclick="'on_submit()"/&gt;</FONT> but not getting the result.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any help is highly appreciated.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks &amp; Regards,</DIV>
<DIV>Saurabh Sinha</DIV>
<DIV>&nbsp;</DIV><p><font face=arial size=-1>
<a href="http://in.rd.yahoo.com/specials/mailtg/*http://yahoo.shaadi.com/india-matrimony/" target="_blank">
<b>Yahoo! India Matrimony</a>:</b> Find your partner 
<a href="http://in.rd.yahoo.com/specials/mailtg2/*http://yahoo.shaadi.com/india-matrimony/community.php" target="_blank">online</a>.</font>