Hi I have a little problem that I have been banging my head over the
past couple of days with..
I have a form of options that is dynamically created by a recorset in
a database..
ex..
Select Option Description Price qty total
[] {Checkbox} Option description $11.00 1 11.00
ok the value for the checkbox is the ID for the particular option
from the database table. and the Description and Price are also
coming from the database table.
the Total price is calculated when the qty even is onBlur. (this
works ok.
when I go to the next page it dosn't seem to loop through all the
selected elements..
heres a snippet of the code that I'm working on
<%
while not rs.eof
Prod = rs("FeatureCode")
%>
<!--#include file="Recommended.inc"-->
<tr>
<td><div align="center">
<input name="Option" type="checkbox"
id="Option" value="<% response.write rs("FeatureCode") %>">
</div></td>
<td><input name="Description<%response.write
Prod %>" type="hidden" value="<%response.write rs("Description") %>">
<% response.write rs("Description") %> </td>
<td>$<input type="text" name="Price<%
response.write Prod %>" size="8"></td>
<td><input name="Qty<% response.write Prod %
>" type="text" value="0" size="4" onBlur="Options.Total<%
response.write Prod %>.value=Options.Qty<% response.write Prod %
>.value*Options.Price<% response.write Prod %>.value;"></td>
<td>$<input type="text" name="Total<%
response.write Prod %>" size= "10"></td>
</tr>
<%
rs.movenext
wend
and I started doing a test asp script on submit of the form to just
display the Feature code and the description of all the selected
features here is that code..
<body>
<%
Options = request.form("Option")
Options = split(Options, ",")
for each member in Options
Desc = request.form("Description"&member)
response.write member&" "&Desc&"<br>"
next
%>
</body>
</html>
this displays the Feturecodes correctly but only shows the first
description and not the others asscociated with their respective
Feature Code..
this was just a test script to see if I can get them to display
properly.. after that I can rewrite the code to save each selected
feature to a database table..
any help would be appreciated..
Thank You
Dean Forant
past couple of days with..
I have a form of options that is dynamically created by a recorset in
a database..
ex..
Select Option Description Price qty total
[] {Checkbox} Option description $11.00 1 11.00
ok the value for the checkbox is the ID for the particular option
from the database table. and the Description and Price are also
coming from the database table.
the Total price is calculated when the qty even is onBlur. (this
works ok.
when I go to the next page it dosn't seem to loop through all the
selected elements..
heres a snippet of the code that I'm working on
<%
while not rs.eof
Prod = rs("FeatureCode")
%>
<!--#include file="Recommended.inc"-->
<tr>
<td><div align="center">
<input name="Option" type="checkbox"
id="Option" value="<% response.write rs("FeatureCode") %>">
</div></td>
<td><input name="Description<%response.write
Prod %>" type="hidden" value="<%response.write rs("Description") %>">
<% response.write rs("Description") %> </td>
<td>$<input type="text" name="Price<%
response.write Prod %>" size="8"></td>
<td><input name="Qty<% response.write Prod %
>" type="text" value="0" size="4" onBlur="Options.Total<%
response.write Prod %>.value=Options.Qty<% response.write Prod %
>.value*Options.Price<% response.write Prod %>.value;"></td>
<td>$<input type="text" name="Total<%
response.write Prod %>" size= "10"></td>
</tr>
<%
rs.movenext
wend
and I started doing a test asp script on submit of the form to just
display the Feature code and the description of all the selected
features here is that code..
<body>
<%
Options = request.form("Option")
Options = split(Options, ",")
for each member in Options
Desc = request.form("Description"&member)
response.write member&" "&Desc&"<br>"
next
%>
</body>
</html>
this displays the Feturecodes correctly but only shows the first
description and not the others asscociated with their respective
Feature Code..
this was just a test script to see if I can get them to display
properly.. after that I can rewrite the code to save each selected
feature to a database table..
any help would be appreciated..
Thank You
Dean Forant