添加到购物车功能也关闭弹出窗口 [英] add to cart function also to close pop-up window

查看:161
本文介绍了添加到购物车功能也关闭弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个购物车表单功能(添加到购物车按钮),这是通过java脚本调用的 - 我在弹出窗口中有这个并希望添加到购物车按钮都关闭弹出窗口并在主窗口中加载信息 - 任何人都知道我需要修改哪些脚本?



这是弹出窗口中当前代码的一部分:



< form class =cartaction =index-shop.phpmethod =post>< input class =buttontype =submitname =my-add-buttonvalue =add to cart/ >< / form>





任何帮助都会超级!

解决方案

任何人对此都有任何想法?这里是最初通过图像映射链接触发到javascript弹出窗口的完整代码:

< input type =hiddenname =my-item-idvalue = book1/>< input type =hiddenname =my-item-namevalue =book1/>< input type =hiddenname =my-item-pricevalue = 35.00/>< input type =hiddenname =my-item-urlvalue =http://www.amazone.com/>数量:< input type =textname =my-item-qtyvalue =1size =3/>< input class =buttontype =submitname =my-add-buttonvalue =add to cart />< /形式>

I'm trying to setup a shopping cart form function (add to cart button) which is called via a java script - I have this in a pop-up window and want to have the "add to cart" button both close the pop-up window and also load the info in the main window - anyone know what script modifications I need to have?

here is part of my current code in the pop-up window:

<form class="cart" action="index-shop.php" method="post"><input class="button" type="submit" name="my-add-button" value="add to cart" /></form>


any help would be super!

解决方案

anyone have any ideas to this? here is the complete code that is being triggered originally through an image map link into a javascript pop-up window:
<input type="hidden" name="my-item-id" value="book1" /><input type="hidden" name="my-item-name" value="book1" /><input type="hidden" name="my-item-price" value="35.00" /><input type="hidden" name="my-item-url" value="http://www.amazone.com" />Qty: <input type="text" name="my-item-qty" value="1" size="3" /><input class="button" type="submit" name="my-add-button" value="add to cart" /></form>


这篇关于添加到购物车功能也关闭弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆