Active Server Pages Programming (ASP)/ASP radio button query
Expert: Srini Nagarajan - 10/12/2011
Questionhey..see this coding.
<form name="frmSearch" method="post" runat="server">
<div name="div1" id="div1"><font size='3'>
Destinations for PIN: <%=request("pin") %> </font></div>
<table border="1" cellpadding="2" cellspacing="0" align="left" style="width: 656px">
<tr bgcolor="#C0C0C0" >
<td colspan="4" align="center">
Search by CLI: </td>
</tr>
<tr>
<td bgColor=#f5f5f5 align=left>CLI:</td>
<td bgColor=#f5f5f5 align=left nowrap >
<input type=text name=txtcli id=txtPin />    
<input type="submit" name="btnCli" value="Get Destinations" style="font-size:7pt; font-family: Verdana; padding:0px; margin:0px; background:#D7D4F0">
</td>
<td bgColor=#f5f5f5 align=left> <form action="
http://172.16.18.13/servicerest/expiredestination.php?action=getdestsandcli&cli=("cli")&"&pin="&request.QueryString("pin")&"view="&request.QueryString("ëxpired") >
<input type="radio" name="radiobutton1" value="expired"> Expired    
<input type="radio" name="radiobutton1" value="not expired"> Not Expired
</form>
</td>
</tr>
</table>
</form>
<%
if request.Form("btnCli")<>"" then
response.Redirect "/TAMS/Customer_Service/Search/viewDestinations.asp?opt=cli&cli="&request("txtcli")&"&pin="&request("pin")
end if
%>
i have to show
http://172.16.18.13/servicerest/expiredestination2.php?action=getdestsandcli&cli on the click of expire radiobutton and other one link to sshow on clicking " not expired" radio button...what should i do..and same button to be used i.e get destinations to show the data..please help me out..i am new to asp
Answerhi
you can create a hidden variable, on clicking of radio button, create a javascript method on click of radio button you can call the javascript function. In the javascript function update the value of which button is clicked onto hidden variable.
In the form pass hidden variable and which will have necessary value and figure which one to display.
Happy programming
-Srini