hi everyone
i am getting problem in this code
ths problem is :
there are two queries ,depending on radio button the queries willll exceute .everything is ok ,but only last query is exceuting ,my code is written below
i want :if user select a first radio button and click on the view button first query has to be diplayed or excuted .else if user selet second radio button and click the view button second query should be dipalyed .please help me
[code]
<SCRIPT LANGUAGE=JavaScript>
display()
{
somefunction();
check();
}
<FORM NAME=form1 method=post>
<input type=”radio” value=”1″ name=”Fee” checked= true>
<input type=”radio” value=”2″ name=”Fee” >
<input type=”submit” value=” View ” name=”B1″ onclick=”display();” >
function check()
{
if(document.form1.Fee[0].checked == true)
{
alert(document.form1.Fee[0].value);
<%
strsql1=”select * from buyer_master “;
// rs=statement.executeQuery(strsql1);
%>
}
else if(document.form1.Fee[1].checked == true)
{
alert(document.form1.Fee[1].value);
<%
strsql1=”select * from emd_master”;
// rs=statement.executeQuery(strsql1);
%>
}
}
out.print(strsql1);