hyefive
11-27-2002, 01:07 AM
Hi,
I'm a JavaScript newbie and just finished looking to no avail for my answer in the old posts. Perhaps someone can help me.
*** First, I'm collecting variables like so:
<%
agt = Request.QueryString("agt")
AGT_CODE = Request.QueryString("AGT_CODE")
OFFICE_COD = Request.QueryString("OFFICE_COD")
%>
*** Next, there's a form that requests different info for different PROP_TYPE values:
<html>
<form action="postf2.asp" method="post" name="form1">
<...td>
<input type="radio" name="PROP_TYPE" value="RES" onClick="res_on();">Residential
<input type="radio" name="PROP_TYPE" value="INC" onClick="inc_on();">Residential Income
*** other form fields below, depending on which PROP_TYPE...
<.../table>
*** From what I gathered in the post archives, I could use the following in the <head> tag to bring the "agt" variable back to the page so I don't lose it:
<%
Response.Write "<script language=javascript>"
Response.Write "function res_on(){"
Response.Write "document.form1.action=postf.asp?PROP_TYPE=RES&agt=" & agt & "&AGT_CODE='" & AGT_CODE & "'&OFFICE_COD='" & OFFICE_COD & "';"
Response.Write "document.form1.submit();"
Response.Write "}"
Response.Write "function inc_on(){"
Response.Write "document.form1.action=postf.asp?PROP_TYPE=INC&agt=" & agt & "&AGT_CODE='" & AGT_CODE & "'&OFFICE_COD='" & OFFICE_COD & "';"
Response.Write "document.form1.submit();"
Response.Write "}</script>"
%>
*** It's not working for me, however.
Any assistance would be greatly appreciated!
Mark
I'm a JavaScript newbie and just finished looking to no avail for my answer in the old posts. Perhaps someone can help me.
*** First, I'm collecting variables like so:
<%
agt = Request.QueryString("agt")
AGT_CODE = Request.QueryString("AGT_CODE")
OFFICE_COD = Request.QueryString("OFFICE_COD")
%>
*** Next, there's a form that requests different info for different PROP_TYPE values:
<html>
<form action="postf2.asp" method="post" name="form1">
<...td>
<input type="radio" name="PROP_TYPE" value="RES" onClick="res_on();">Residential
<input type="radio" name="PROP_TYPE" value="INC" onClick="inc_on();">Residential Income
*** other form fields below, depending on which PROP_TYPE...
<.../table>
*** From what I gathered in the post archives, I could use the following in the <head> tag to bring the "agt" variable back to the page so I don't lose it:
<%
Response.Write "<script language=javascript>"
Response.Write "function res_on(){"
Response.Write "document.form1.action=postf.asp?PROP_TYPE=RES&agt=" & agt & "&AGT_CODE='" & AGT_CODE & "'&OFFICE_COD='" & OFFICE_COD & "';"
Response.Write "document.form1.submit();"
Response.Write "}"
Response.Write "function inc_on(){"
Response.Write "document.form1.action=postf.asp?PROP_TYPE=INC&agt=" & agt & "&AGT_CODE='" & AGT_CODE & "'&OFFICE_COD='" & OFFICE_COD & "';"
Response.Write "document.form1.submit();"
Response.Write "}</script>"
%>
*** It's not working for me, however.
Any assistance would be greatly appreciated!
Mark