Forum Moderators: open
I want to use multiples of it as menu choices, no problem there.
But each choice as yet only takes you to a page. I want it to choose the same page but have a variable set so that the asp code on the page can tell which choice it was and alter the query.
It is part of a simple shopping cart and using anything besides onclick seems to causes the cart to reset (another thing I have to look at).
Also, my old html book does not mention onclick. What version of code is this command and where can I find good online references to it?
in the sample below 'choose' is to get the string 'wipers' and the product.asp page needs to take the string and add it to myquery which becomes the query for what parts are to be shown.
Sample of the code, 2 files.
this is the head.asp file
<p>[ <a href='#'
onClick='go("/index.asp");return false;'>Home</a> ¦ <a href='#'
onClick='go("products.asp?choose=bulbs");return false;'>bulbs</a> ¦ <a href='#'
onClick='go("products.asp?choose=wipers");return false;'>wipers</a> ¦ <a href='#'
onClick='go("products.asp?choose=oil");return false;'>oil</a> ¦ <a href='#'
onClick='go("cart.asp");return false;'>Show Cart</a> ]
this is the products asp file:
<!--#include file='db.asp'-->
<!--#include file='head.asp'-->
*** notice the link to head.asp which shows this menu on the products page
<title>Auto Supplies</title>
<table border=0 width=500 cellpadding=0 cellspacing=0>
<%
' Value of text input field "choose"
myquery = Request.Form("choose")
myquery = "exec q"
if myquery = "exec q" then myquery = "exec qlistall"
' executing stored procedure
set rs = conn.execute(myquery)
do while not rs.eof
*** end of file
Any help would be welcomed.
Thanks
' Value of text input field "choose"
myquery = request.querystring("choose")
myquery = "exec q" & myquery
if myquery = "exec q" then myquery = "exec qlistall"
Is that right?
Yes I tried it sw where other mistakes were made and now it looks like it works.
thanks