How do you make "click on image" do this?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
marksm
Beginner
Beginner
Posts: 6
Joined: Tue Aug 19, 2003 6:42 pm
Location: Holdrege, NE USA

How do you make "click on image" do this?

Post by marksm »

Hello,

For starters, I'm an HTML and Javascript novice (or whatever's before that)!

My shopping cart provider wants "view shopping cart" to be accessed by clicking an image that does the following HTML code. I know how to get my image into my DHTML menu, but how do I make the following HTML stuff happen when the image is clicked?

<form action=http://www.cartserver.com/sc/cart.cgi method=POST>
<input type=hidden name=item value="a-1358">
<input type=image border=0 name=view src="viewcart.gif" width=154 height=46>
</form>

Thanks,

Mark
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

You can put forms into menus as items...heres a way Andy (the menus creator) got a form and a text search box into a menu...you can see it on the search menu on the homepage.

Code: Select all

aI("text=<FORM METHOD=GET ACTION=/search.php name=search><table><tr><td>Search Milonic</td></tr><tr><td><input name=q size=11></td></tr><tr><td><input type=submit value=Search></td></tr></table></form>;type=form;align=center");
Notice he put the whole HTML thing into the menu text, but he made sure not to use quotes or single quotes to screw things up. Also the type was set to form, important.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply