Discussions
Categories
Groups
Advertisement
Child Item
Home
Topics
Technology & Internet
Software & Web Development
Development
ASP table sending data problem
The_B_Man
i am tryin to send data from a table to another page using a hyperlink ending with a "?". the problem is that i cant figure out how to send the values of my radio buttons thru the link. can anyone help? thanx
<table border=1><tr><th><font color="#3399FF" face="Atlantis">prodno</th><th><font color="#3399FF" face="Atlantis">colours available</font></th><th><font color="#3399FF" face="Atlantis">pic</font></th><th><font color="#3399FF" face="Atlantis">size</font></th><th><font color="#3399FF" face="Atlantis">type</font></th><th><font color="#3399FF" face="Atlantis">Options</font></th></tr>
<% do while not ResultVariable.EOF %>
<tr>
<td><font color="#3399FF" face="Atlantis"><%=ResultVariable(0)%></font></td>
<td><font color="#3399FF" face="Atlantis">
Red <input type=radio value=red name=colour><br>
Green<input type=radio value=green name=colour><br>
Blue <input type=radio value=blue name=colour><br>
</font></td>
<td><font color="#3399FF" face="Atlantis"><img src="<%=ResultVariable(2)%>"></font></td>
<td><font color="#3399FF" face="Atlantis">
Small<input type=radio value=small name=size><br>
Med <input type=radio value=med name=size><br>
Large<input type=radio value=large name=size><br>
</font></td>
<%
Set size=size.value
%>
<td><font color="#3399FF" face="Atlantis"><%=ResultVariable(4)%></font></td>
<td><font color="#3399FF" face="Atlantis">
<a href=shopping.asp?sex=women&prodno=<%=ResultVariable(0)%>&colour=<%="'" & colour & "'"%>&size=>Add to cart</a></tr>
<%
ResultVariable.MoveNext
' move to the next row in the data set
loop
' goto the next itteration of the while loop
ResultVariable.Close
Conntemp.Close
%>
</table>
Find more posts tagged with
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
Advertisement
Advertisement
Comments
Seth Brundle
just have the form (which doesn't appear to exist yet) got to update_cart.asp (not sure what your shopping.asp does) as follows:-
<table border=1><tr><th><font color="#3399FF" face="Atlantis">prodno</th><th><font color="#3399FF" face="Atlantis">colours available</font></th><th><font color="#3399FF" face="Atlantis">pic</font></th><th><font color="#3399FF" face="Atlantis">size</font></th><th><font color="#3399FF" face="Atlantis">type</font></th><th><font color="#3399FF" face="Atlantis">Options</font></th></tr>
</TABLE>
<% do while not ResultVariable.EOF %>
<FORM METHOD="get" ACTION="update_cart.asp">
<table border=1>
<tr>
<td><font color="#3399FF" face="Atlantis"><%=ResultVariable(0)%></font></td>
<td><font color="#3399FF" face="Atlantis">
Red <input type=radio value=red name=colour><br>
Green<input type=radio value=green name=colour><br>
Blue <input type=radio value=blue name=colour><br>
</font></td>
<td><font color="#3399FF" face="Atlantis"><img src="<% = ResultVariable(2)%>"></font></td>
<td><font color="#3399FF" face="Atlantis">
Small<input type=radio value=small name=size><br>
Med <input type=radio value=med name=size><br>
Large<input type=radio value=large name=size><br>
</font></td>
<td><font color="#3399FF" face="Atlantis"><%=ResultVariable(4)%></font></td>
<td><font color="#3399FF" face="Atlantis">
<INPUT TYPE="submit" VALUE="update cart">
<INPUT TYPE="hidden" NAME="sex" VALUE="women" >
<INPUT TYPE="hidden" NAME="prodno" VALUE="=<%=ResultVariable(0)%>">
</FONT>
</tr>
</table>
</FORM>
<%
ResultVariable.MoveNext
' move to the next row in the data set
loop
' goto the next itteration of the while loop
ResultVariable.Close
Conntemp.Close
%>
ps lose the font tags!