erjohns
05-06-2005, 03:19 PM
I think I've got this working. The goal is to access a section from a drop down list and manipulate it to yield the proper text in a table. I'm not including the entire code as only what I'm including here applies. Please look it over and tell me if I'm on the right track.
page: default.asp
<% language = "VBSCRIPT" %>
<!-- #include file = " ../calculate.asp" -->
<%
units= "Imperial"
If (Request.QueryString("meas") = "nM-m" or
(Request.QueryString("meas") = "Nm) Then
units = "Metric"
Else units = "Imperial"
End If
%>
<html>
<body>
<table border = 1>
<tr>
<form action="default.asp" method = "post">
<td colspan = 2>
<select id = "meas" name = "meas" onChange="<% meas=Request.form("meas")>
<option value = " " selected=selected> </option>
<option value = "oz-in"> oz-in </option>
<option value = "lb-in"> lb-in </option>
<option value = "nM-m"> nM-m </option>
<option value = "Nm> Nm </option>
</select>
<input name ="allSubmit" type = "submit" id = "allSubmit4" value = "View New Data">
</td>
</form>
</tr>
</table>
<hr>
<hr>
<table border = 1 width = "40%">
<tr>
<td><% = Tmaxu %></td>
<td><% = Tcsu %></td>
<td><% = Tfmaxu %></td>
<td><% = Tpu %></td>
<td><% = Kmu %></td>
<td><% = Jmsensu %></td>
<td><% = whu %></td>
<td><% = wfu %></td>
</tr>
</table>
</body>
</html>
page calculate.asp
<%
Dim Tmaxu, Tfmaxu, Tpu, Kmu, Jmsensu, whu, wfu
Tmaxu = Request.QueryString("meas")
Tcu = Request.QueryString("meas")
Tfmaxu = Request.QueryString("meas")
Tpu = Request.QueryString("meas")
Kmu = Request.QueryString("meas")
if Request.QueryString("units") = "metric" Then
Jmsensu = " g-cm ² "
whu = "g"
wfu = "g"
Else
Jmsensu = "oz-S ² × 10 ⊃ -4"
whu = "oz"
wfu = "oz"
%>
Keep in mind I've marked where one page ends and the other begins and both HAVE to be in use for this to work right.
Thanks in advance
Eric
page: default.asp
<% language = "VBSCRIPT" %>
<!-- #include file = " ../calculate.asp" -->
<%
units= "Imperial"
If (Request.QueryString("meas") = "nM-m" or
(Request.QueryString("meas") = "Nm) Then
units = "Metric"
Else units = "Imperial"
End If
%>
<html>
<body>
<table border = 1>
<tr>
<form action="default.asp" method = "post">
<td colspan = 2>
<select id = "meas" name = "meas" onChange="<% meas=Request.form("meas")>
<option value = " " selected=selected> </option>
<option value = "oz-in"> oz-in </option>
<option value = "lb-in"> lb-in </option>
<option value = "nM-m"> nM-m </option>
<option value = "Nm> Nm </option>
</select>
<input name ="allSubmit" type = "submit" id = "allSubmit4" value = "View New Data">
</td>
</form>
</tr>
</table>
<hr>
<hr>
<table border = 1 width = "40%">
<tr>
<td><% = Tmaxu %></td>
<td><% = Tcsu %></td>
<td><% = Tfmaxu %></td>
<td><% = Tpu %></td>
<td><% = Kmu %></td>
<td><% = Jmsensu %></td>
<td><% = whu %></td>
<td><% = wfu %></td>
</tr>
</table>
</body>
</html>
page calculate.asp
<%
Dim Tmaxu, Tfmaxu, Tpu, Kmu, Jmsensu, whu, wfu
Tmaxu = Request.QueryString("meas")
Tcu = Request.QueryString("meas")
Tfmaxu = Request.QueryString("meas")
Tpu = Request.QueryString("meas")
Kmu = Request.QueryString("meas")
if Request.QueryString("units") = "metric" Then
Jmsensu = " g-cm ² "
whu = "g"
wfu = "g"
Else
Jmsensu = "oz-S ² × 10 ⊃ -4"
whu = "oz"
wfu = "oz"
%>
Keep in mind I've marked where one page ends and the other begins and both HAVE to be in use for this to work right.
Thanks in advance
Eric