Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Box value as parameter to hyperlink?

Status
Not open for further replies.

lingyi

Programmer
Apr 11, 2001
65
0
0
SG
Hi,
I got one text box which as for user to enter the quantity that user want. This text box will going through a loop of recordset. I named my text box as name=&quot;<%response.write &quot;Qty_&quot; & rst(&quot;ItemCode&quot; %>. Beside of the text box it will have one image. When user click on the image, it will perform a hyperlink go to another asp page. Here is the code belows:
<a href=&quot;Order_Items.asp?ItemCode=<% response.write rstFile(&quot;ItemCode&quot;) %>+&Quantity=<% response.write &quot;Qty_&quot; & rst(&quot;ItemCode&quot; %>&quot; target=&quot;mainFrame&quot;><img src=&quot;Images/addcart_icon.gif&quot; width=&quot;32&quot; height=&quot;31&quot; alt=&quot;Add to Cart&quot; border=&quot;0&quot; ></a>
The point is the Quantity parameter return me the text of the text box been named. Anyone got any idea of retrieve the value of it?
Thanks :)
 
Hi,

There is a sorta arse-backwards way to do this, but I know it works. If you surround the data entry fields (textboxes) with a <form> object, then if you have the image submit those fields to an asp page which assembles the request.form items into a variable, they can then be send as a response.write(RedirectPath), where RedirectPath is an assembled variable from the values submitted in the previous page.

The other way to do this, which im not 100% familiar with, so I will only suggest, is to use javascript and forms to call the values upon submission.

Hope this helps!
-Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top