Click to See Complete Forum and Search --> : Back problem [ASP]


puneetg123
August 24th, 2003, 10:01 AM
hi all,
i am maintaining an e-commerce project that involves checking for the quantity in stock before placing the order.
initially the quantity valivation (checking wether the qty order placed is in stock or not) was not provided in the code for cart.
due to some reasons i cannot provide the said validation in cart....so what i did is placed another asp file (checkqty.asp) just before cart.asp that checks the validation.
if the qty placed is ok then cart.asp is redirected otherwise not.
its working fine and the way i wanted...
but the problem is that... the back button of cart.asp is not working properly...
it again places the cart.asp page...
i have tried placing
Response.Expires=0
in checkqty.asp..
please suggest what can be done so that on clicking back button of cart.asp...we are directed to file before checkqty.asp.
regards,
puneet
:confused:

ZoSoo7
August 26th, 2003, 03:22 PM
There are a couple of things that might work. Instead of using Response.Redirect (I'm assuming that's what you're using, unless you're doing it client side), try Server.Execute "url". If that doesn't work, what I would do is instead of redirecting, do an include of the cart.asp page, basically like below, but you will have to do the validation server side if you're not already:

on the qty.asp page or whatever you called it, do this

Do validation code
<% If validated then %>
<!-- #include file="cart.asp" -->
<%else
do whatever
end if%>

Good luck, I hope this helps.

puneetg123
August 26th, 2003, 03:27 PM
hi..
thanks for that nice idea...
i hope that would work...
let me proceed in that direction...and will let you knw what's next...
regards,
puneet