bourniqc
06-04-2003, 01:46 PM
I am new to the forum. I am creating a web app for employee/managers to enter performance reviews. In one section, I have Keybehaviors section that is dynamically built from a table based on the company that the employee works for.
The problem that I have is how do you get the value from the radio button, if you assigned the button by a variable. The variable is what is being passed to the next form.
I can not use querystring because of the length limitations. Also, the form is very long and has a lot fields.
I am attaching the code for the dataentry page. (subset of the web app) and the code to view the data.
Cheryl
dataentry.asp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>data entry-kb</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<body>
<form name="dataentry" method="post" action="viewdata2.asp">
<hr width="90%" noshade color="#000000" size="5">
<div align="center"><center><table border="2" width="60%">
<tr bgcolor="#EEFFFF">
<font size="2"><td width="236" height="1"><div align="center"><center><p><strong><font
color="#000080">Key Behavior</font></strong></font></td>
<td width="73" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Weight</font></strong></td>
<td width="259" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Rating</font></strong></p>
</center></div><div align="center"><center><p><strong><font color="#000080"><small>(Explanation
of Ratings - Click on Key Behavior)</small></font></strong></td>
</tr>
<%
While not rsgetKBinfo.eof
RATING_NAME = RSGETKBINFO("CODE")
CODE_NAME = RSGETKBINFO("CODE_NAME")
%>
<tr align="center">
<td width="254" align="center" valign="top" height="125"><strong><%=code_name%></strong><br>
<font color="#FF0000"><strong>(Required)</strong></font></td>
<td width="75" height="125"><div align="center"><center><p><input type="text"
name="weight" size="3"></td>
<td width="276" height="125" align="center"><div align="left"><p><small><input
type="radio" name="<%=RATING_NAME%>" value="4">4 <em><strong>Outstanding Performer</strong></em></small></p>
</div><div align="left"><p><small><input type="radio" name="<%=RATING_NAME%>" value="3">3
<em><strong>High Performer</strong></em></small></p>
</div><div align="left"><p><small><input type="radio" name="<%=RATING_NAME%>" value="2">2
<em><strong>Proficient</strong></em></small></p>
</div><div align="left"><p><small><input type="radio" name="<%=RATING_NAME%>" value="1">1 <strong><em>
Needs Improvement</em></strong></small></td>
</tr>
<%
rsgetKBinfo.movenext
wend
%>
</table>
</center></div><div align="center"><div align="center"><center><table border="0"
width="90%">
<tr align="middle">
<td width="50%" colspan="2"><div align="center"><center><p><strong>REVIEW STATUS </strong></td>
</tr>
<tr align="center">
<td width="36%"><div align="left"></div></td>
<td width="64%" align="left"><input type="radio" value="WIP" name="reviewstatus">Work in
Progress </td>
</tr>
<tr align="center">
<td width="36%"></td>
<td width="64%" align="left"><input type="radio" value="TEMP" name="reviewstatus">Template
</td>
</tr>
<tr align="center">
<td width="36%"></td>
<td width="64%" align="left"><input type="radio" value="COMP" name="reviewstatus" checked>Complete
(Calculate)</td>
</tr>
</table>
</center></div><div align="center">
<dd align="center"> </dd>
<dd align="center"> </dd>
<dd align="center"><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"> </dd>
</div><%
response.write ("<input type=""hidden"" name=""RATING_NAME"" value=")
response.write chr(34)
response.write RATING_NAME
response.write chr(34)
response.write ">"
%>
</div>
</form>
</body>
</html>
viewdata2.asp
<html>
<head>
<title></title>
</head>
<body>
<p align="LEFT"><font size="3"><a href="<%=INSTRUCTIONS%>">Instructions</a> on how to fill
this form</font><b><font size="5" color="#000080"> </p>
</font>
<p ALIGN="CENTER"><font size="5" color="#000080"><%=TITLE%> </p>
<p align="center"><font size="5" color="#000080"><br>
Management/Exempt<br>
Performance Management Plan and Assessment </font></p>
<form method="POST" action="postdata.asp" align="center"
onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
</font><dl>
<dd align="center"><%=MINDESCRIPTION1%>
</dd>
<dl>
<dd align="center"></b><b> </dd>
<dd align="center"></b><b> </dd>
<dd align="center"><div align="center"><hr width="90%" noshade color="#000000" size="5"
align="center">
<div align="center"><center><table border="1" height="66" width="90%">
<tr bgcolor="#EEFFFF">
<font size="5" color="#000000"><strong><td height="60"></strong><font size="4"
color="#000000"><a name="kba">III. KEY BEHAVIOR ASSESSMENT:</a></font><font
color="#000080" face=" serif" size="3"><p><%=kb_DESCRIPTION1%></p>
<p><%=kbDESCRIPTION1%></p>
<p><%=kbDESCRIPTION2%></font> </p>
<p><font color="#000080" size="3"><a href="<%=INSTRUCTIONS%>">Click here for help</a></font></font></td>
</tr>
</table>
</center></div><div align="center"><center><p><%=kbdescription3%></p>
</center></div><div align="center"><center><table border="2" width="60%">
<tr bgcolor="#EEFFFF">
<font size="2"><td width="236" height="1"><div align="center"><center><p><strong><font
color="#000080">Key Behavior</font></strong></font></td>
<td width="73" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Weight</font></strong></td>
<td width="259" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Rating</font></strong></td>
<td width="259" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Score </font></strong></p>
</center></div><div align="center"><center><p><small><strong><font color="#000080">(Weight
x Rating)</font></strong></small></td>
</tr>
<tr align="center">
<%
While not rsgetKBinfo.eof
CODE_NAME = RSGETKBINFO("CODE_NAME")
DIM KB_WEIGHT_STRING
DIM KB_WEIGHT_ARRAY
DIM KB_WEIGHT_COUNTER
KB_WEIGHT_STRING = WEIGHT
KB_WEIGHT_ARRAY = SPLIT(KB_WEIGHT_STRING,",")
%>
</tr>
<tr align="center">
<td width="254" align="center" valign="top" height="125"><strong><%=CODE_NAME%></strong><br>
<font color="#FF0000"><strong>(Required)</strong></font></td>
<td width="75" height="125"><div align="center"><center><p><font face="Times New Roman"
size="3" color="#0000FF"><%=KB_WEIGHT_ARRAY(KB_WEIGHT_COUNTER)%> % </font></td>
<td align="center" bgcolor="#FFFFFF" width="78"><%=rating_name%>
</td>
<% KB_WEIGHT_COUNTER = KB_WEIGHT_COUNTER +1
rsgetkbinfo.movenext
wend
%>
<td align="center" bgcolor="#FFFFFF" width="78"> </td>
</tr>
</table>
</center></div><div align="center"><center><p><font color="#000000"><big><big><%=mgr_description%></big></big></font></p>
</center></div><div align="center"><center><p> </p>
</center></div></div></dd>
<div align="center"><center>
<dt> </dt>
</center></div>
<dd align="center"><div align="center"><center><table border="1" width="30%">
<tr>
<td align="left"><input type="radio" value="WIP" name="reviewstatus"
<%response.write WIPSTATUS%>>Work in Progress </td>
</tr>
<tr>
<td align="left"><input type="radio" name="reviewstatus" value="COMP"
<%response.write CALCSTATUS%>>Completed </td>
</tr>
<tr>
<td align="left"><input type="radio" name="reviewstatus" value="TEMP"
<%response.write TEMPSTATUS%>>Template (Enter Template Name) <input
type="text" name="strTemplateName" size="30"></td>
</tr>
</table>
</center></div></dd>
<dd align="center"> </dd>
<dd align="center"><div align="center"><center><p><input type="submit" value="Submit"
name="B1"><input type="reset" value="Reset" name="B2"> </p>
</center></div></dd>
</dl>
<%
%>
</dl>
</form>
</b>
</body>
</html>
The problem that I have is how do you get the value from the radio button, if you assigned the button by a variable. The variable is what is being passed to the next form.
I can not use querystring because of the length limitations. Also, the form is very long and has a lot fields.
I am attaching the code for the dataentry page. (subset of the web app) and the code to view the data.
Cheryl
dataentry.asp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>data entry-kb</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<body>
<form name="dataentry" method="post" action="viewdata2.asp">
<hr width="90%" noshade color="#000000" size="5">
<div align="center"><center><table border="2" width="60%">
<tr bgcolor="#EEFFFF">
<font size="2"><td width="236" height="1"><div align="center"><center><p><strong><font
color="#000080">Key Behavior</font></strong></font></td>
<td width="73" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Weight</font></strong></td>
<td width="259" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Rating</font></strong></p>
</center></div><div align="center"><center><p><strong><font color="#000080"><small>(Explanation
of Ratings - Click on Key Behavior)</small></font></strong></td>
</tr>
<%
While not rsgetKBinfo.eof
RATING_NAME = RSGETKBINFO("CODE")
CODE_NAME = RSGETKBINFO("CODE_NAME")
%>
<tr align="center">
<td width="254" align="center" valign="top" height="125"><strong><%=code_name%></strong><br>
<font color="#FF0000"><strong>(Required)</strong></font></td>
<td width="75" height="125"><div align="center"><center><p><input type="text"
name="weight" size="3"></td>
<td width="276" height="125" align="center"><div align="left"><p><small><input
type="radio" name="<%=RATING_NAME%>" value="4">4 <em><strong>Outstanding Performer</strong></em></small></p>
</div><div align="left"><p><small><input type="radio" name="<%=RATING_NAME%>" value="3">3
<em><strong>High Performer</strong></em></small></p>
</div><div align="left"><p><small><input type="radio" name="<%=RATING_NAME%>" value="2">2
<em><strong>Proficient</strong></em></small></p>
</div><div align="left"><p><small><input type="radio" name="<%=RATING_NAME%>" value="1">1 <strong><em>
Needs Improvement</em></strong></small></td>
</tr>
<%
rsgetKBinfo.movenext
wend
%>
</table>
</center></div><div align="center"><div align="center"><center><table border="0"
width="90%">
<tr align="middle">
<td width="50%" colspan="2"><div align="center"><center><p><strong>REVIEW STATUS </strong></td>
</tr>
<tr align="center">
<td width="36%"><div align="left"></div></td>
<td width="64%" align="left"><input type="radio" value="WIP" name="reviewstatus">Work in
Progress </td>
</tr>
<tr align="center">
<td width="36%"></td>
<td width="64%" align="left"><input type="radio" value="TEMP" name="reviewstatus">Template
</td>
</tr>
<tr align="center">
<td width="36%"></td>
<td width="64%" align="left"><input type="radio" value="COMP" name="reviewstatus" checked>Complete
(Calculate)</td>
</tr>
</table>
</center></div><div align="center">
<dd align="center"> </dd>
<dd align="center"> </dd>
<dd align="center"><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"> </dd>
</div><%
response.write ("<input type=""hidden"" name=""RATING_NAME"" value=")
response.write chr(34)
response.write RATING_NAME
response.write chr(34)
response.write ">"
%>
</div>
</form>
</body>
</html>
viewdata2.asp
<html>
<head>
<title></title>
</head>
<body>
<p align="LEFT"><font size="3"><a href="<%=INSTRUCTIONS%>">Instructions</a> on how to fill
this form</font><b><font size="5" color="#000080"> </p>
</font>
<p ALIGN="CENTER"><font size="5" color="#000080"><%=TITLE%> </p>
<p align="center"><font size="5" color="#000080"><br>
Management/Exempt<br>
Performance Management Plan and Assessment </font></p>
<form method="POST" action="postdata.asp" align="center"
onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
</font><dl>
<dd align="center"><%=MINDESCRIPTION1%>
</dd>
<dl>
<dd align="center"></b><b> </dd>
<dd align="center"></b><b> </dd>
<dd align="center"><div align="center"><hr width="90%" noshade color="#000000" size="5"
align="center">
<div align="center"><center><table border="1" height="66" width="90%">
<tr bgcolor="#EEFFFF">
<font size="5" color="#000000"><strong><td height="60"></strong><font size="4"
color="#000000"><a name="kba">III. KEY BEHAVIOR ASSESSMENT:</a></font><font
color="#000080" face=" serif" size="3"><p><%=kb_DESCRIPTION1%></p>
<p><%=kbDESCRIPTION1%></p>
<p><%=kbDESCRIPTION2%></font> </p>
<p><font color="#000080" size="3"><a href="<%=INSTRUCTIONS%>">Click here for help</a></font></font></td>
</tr>
</table>
</center></div><div align="center"><center><p><%=kbdescription3%></p>
</center></div><div align="center"><center><table border="2" width="60%">
<tr bgcolor="#EEFFFF">
<font size="2"><td width="236" height="1"><div align="center"><center><p><strong><font
color="#000080">Key Behavior</font></strong></font></td>
<td width="73" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Weight</font></strong></td>
<td width="259" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Rating</font></strong></td>
<td width="259" height="1" align="center"><div align="center"><center><p><strong><font
color="#000080">Score </font></strong></p>
</center></div><div align="center"><center><p><small><strong><font color="#000080">(Weight
x Rating)</font></strong></small></td>
</tr>
<tr align="center">
<%
While not rsgetKBinfo.eof
CODE_NAME = RSGETKBINFO("CODE_NAME")
DIM KB_WEIGHT_STRING
DIM KB_WEIGHT_ARRAY
DIM KB_WEIGHT_COUNTER
KB_WEIGHT_STRING = WEIGHT
KB_WEIGHT_ARRAY = SPLIT(KB_WEIGHT_STRING,",")
%>
</tr>
<tr align="center">
<td width="254" align="center" valign="top" height="125"><strong><%=CODE_NAME%></strong><br>
<font color="#FF0000"><strong>(Required)</strong></font></td>
<td width="75" height="125"><div align="center"><center><p><font face="Times New Roman"
size="3" color="#0000FF"><%=KB_WEIGHT_ARRAY(KB_WEIGHT_COUNTER)%> % </font></td>
<td align="center" bgcolor="#FFFFFF" width="78"><%=rating_name%>
</td>
<% KB_WEIGHT_COUNTER = KB_WEIGHT_COUNTER +1
rsgetkbinfo.movenext
wend
%>
<td align="center" bgcolor="#FFFFFF" width="78"> </td>
</tr>
</table>
</center></div><div align="center"><center><p><font color="#000000"><big><big><%=mgr_description%></big></big></font></p>
</center></div><div align="center"><center><p> </p>
</center></div></div></dd>
<div align="center"><center>
<dt> </dt>
</center></div>
<dd align="center"><div align="center"><center><table border="1" width="30%">
<tr>
<td align="left"><input type="radio" value="WIP" name="reviewstatus"
<%response.write WIPSTATUS%>>Work in Progress </td>
</tr>
<tr>
<td align="left"><input type="radio" name="reviewstatus" value="COMP"
<%response.write CALCSTATUS%>>Completed </td>
</tr>
<tr>
<td align="left"><input type="radio" name="reviewstatus" value="TEMP"
<%response.write TEMPSTATUS%>>Template (Enter Template Name) <input
type="text" name="strTemplateName" size="30"></td>
</tr>
</table>
</center></div></dd>
<dd align="center"> </dd>
<dd align="center"><div align="center"><center><p><input type="submit" value="Submit"
name="B1"><input type="reset" value="Reset" name="B2"> </p>
</center></div></dd>
</dl>
<%
%>
</dl>
</form>
</b>
</body>
</html>