敏捷Web开发与钢轨 - 阿贾克斯钢轨、敏捷、Web、阿贾克斯

2023-09-11 22:31:38 作者:温婉

使用Rails 2.3.3和网页浏览器Firefox的我已经添加了Ajax和Java脚本,它是工作压力太大,但我每次都重新加载页面时,我preSS加入购物车按钮显示项目additionn在IM边栏就不会没有重装表现出来。

i m using rails 2.3.3 and web browser Firefox i have added ajax and java script and it is working too but i have to reload the page every time when i press Add to Cart button to show item additionn in the side bar it don’t show it without reloading.

请人帮我怎么能显示项目除了在边栏的时候我preSS加入购物车按钮进行重新加载页面?

anyone please help me how can it show item addition in side bar when i press Add to Cart button with out reloading the page?

推荐答案

如果您还没有这样做,安装Firebug的火狐,原因如下:

If you haven't already done so, install Firebug for Firefox, for these reasons:

,它会告诉你,如果你有一个JavaScript错误。 它会告诉你,如果你的Ajax请求被接受,其内容。 您可以检查您的页面元素,如车,看它是否被设置为显示,如果ID是正确的,等了更快的方法不是通过源浏览。 多(CSS等)。

如果您不能算出它通过观察萤火虫控制台,因为你下面的教程,你为什么不下载宝源$ C ​​$ C,并与自己进行比较,看看你再做错了。

If you can't figure it out by looking at the Firebug console, and since you're following a tutorial, why don't you download the Depot source code and compare it with your own to see what you're doing wrong.

如果您有这本书,完整的源列在书的结尾。您也可以下载源来自这里。

If you have the book, the complete source is listed at the end of the book. You can also download the source from here.

 
精彩推荐
图片推荐