views:

54

answers:

2

Hi, what I want to do is basically this: On ONE page, my customers can click a VIEW CART link and the contents of their cart shows below on that same page. here is my basic link form:

 <FORM METHOD=post ACTION="http://www.123websiteservices.com/cgi-bin/cybercart.pl"&gt;
 <INPUT TYPE=hidden NAME=merchant VALUE="jessicas"/>
 <INPUT TYPE=hidden NAME=action VALUE=order/>
 <INPUT TYPE=hidden NAME=page_name VALUE="homepage.html"/>
 <INPUT TYPE=image src="http://www.123websiteservices.com/~jessicas/images/viewcart.gif"     border=0/></FORM>

i can't figure out how to wrap javascript around it to make it work. Any help is greatly appreciated!

+1  A: 

This should get you started on how to show the cart when the viewcart.gif has been clicked.

< script>
function ShowScript() {
   // Do Your Show cart stuff here 
   return false
}
< /script>

...

< input type="image" src="viewcart.gif" onClick="return ShowScript();" />
Stephen Wrighton
A: 
Jess
Well the script tag would be happier in the HEAD section of the document, but yes, like that. Now the stuff that goes into the ShowScript function would be javascript which shows the div or whatever you use to hold the cart info. This search gives you a lot of tutorials on it: http://tiny.cc/HgoMQ
Stephen Wrighton