Dear Whomever,
I am trying to integrate a shopping basket script from
http://www.dhtmlgoodies.com/scripts/fly-to-basket/fly-to-basket.html called fly into basket
a) I have a form such as:
<html>
<head>
<title></title>
<script type="text/javascript" src="js/ajax.js"></script>
<script type="text/javascript" src="js/fly- to-basket.js"></script>
<script language="JavaScript" type="text/javascript">
function formButtonFever(formName,action){
var myString = "document."+formName+"."+action+"();";
eval(myString);
}
</script>
</head>
<body>
<form action="SaveBooking.asp" method="post" name="ThaiFunForm" id="ThaiFunForm">
<input type="text" name="FName" size="15">
<input type="text" name="LName" size="15">
<input type="text" name="Qty" size="5">
<input type="text" name="ProductName" size="25">
<div align="center"><a href="#" id="button1" onclick="formButtonFever('ThaiFunForm','submit')"><span
class="alt">Book!</span></a></div>
</form>
</body>
</html>
b) I want to add the fly-to-basket mechanism to this code so that the form variable info is sent to addProduct.asp when onClick event is fired so as to save it to a database.
The onClick event calls the addToBasket() js function found in fly-to-basket.js (code for js found below).
The idea is to add to the existing onClick event the "addToBasket(1);return false;" call to move the submit button to the basket AND to save the form info.
c) The author of fly-to-basket (
http://www.dhtmlgoodies.com/index.html?whichScript=fly-to-basket) mentions that the addProduct.php file (defined in flyToBasket.js, found below) can be changed to addProduct.asp to handle this. However, tests I made in in addProduct.asp showed NO Request.Form or Request.QueryString data received. The reason, I believe is that the addtobasket() js function doesn't collect form info and instead uses a PHP setvar/getvar (similar to asp session vars) mechanism that is tested after the "fly-by" in a case statement.
d) How do I:
i) collect the form info in my asp file (shown above)
ii) send it to the addToBasket() js function
iii) and have the addProduct.asp subsequently receive the form info, while
iv) allowing the "flying" action to occur as normal
Supporting files:
fly-to-basket.js all come from the above site
Thanks for any help