后退按钮使ASP购物车项目移除变得复杂 [英] Back button complicates ASP shopping cart item removal

查看:54
本文介绍了后退按钮使ASP购物车项目移除变得复杂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我已经使用ASP Classic构建了一个在线购物车(基于''WebThang''

教程)。商店购物车页面(带有显示客户所选商品的表格

和费用)只有3个按钮/链接。


1:返回商店:使用'' javascript :history.go(-1)''转到上一页。


2:删除项目(购物车中每个项目旁边一个):清除所选项目从

会话变量数组重新显示页面。


3:结帐:很好地收集到收集客户的页面

详细信息。


我的问题:


如果用户点击删除项目链接/按钮,页面高效地显示从列表中删除所选项目的
重新显示。但是,如果

用户点击返回商店按钮或浏览器返回按钮

(打算继续购物),购物车页面会重新显示

删除列表中的项目,就像它们删除之前一样。虽然

会话变量数组保持正确不变,但是对用户来说非常混乱,并且可能会让他们觉得他们的购物清单有

'被搞砸了'现在已经无效了。


我明白浏览器只是'做它被告知'但需要

找到一种方法来避免这种令人困惑的行为。


任何想法,


问候


Penny。

Hi all,

I''ve built an online shopping cart using ASP Classic(based on a ''WebThang''
tutorial). The shop cart page (with table showing customers selected items
and costs) has only 3 buttons/links.

1: Back to Shop: Uses ''javascript:history.go(-1)'' to go to previous page.

2: Remove Item(one next to each item in cart): Clears the selected item from
the session variable array redisplays the page.

3: Checkout: Proceeds nicely to the pages that collect the customers
details.

My Problem:

If the user clicks the ''Remove Item'' link/button, the page efficiently
redisplays with the selected item removed from the list. However, if the
user then clicks either the ''Back to Shop'' button or the browser Back button
(intending to continue shopping), the cart page redisplays showing the
removed item back in the list as it was before they removed it. Although the
session variable array remains correctly unaltered it is very confusing to
the user and will probably cause them to feel that their shopping list has
been ''messed up'' and is now invalid.

I understand that the browser is just ''doing what it is told'' but need to
find a way to avoid this confusing behaviour.

Any ideas,

Regards

Penny.

推荐答案



" Penny" < PE *** @ spampolice.com>在消息中写道

news:42 ****** @ funnel.arach.net.au ...

"Penny" <pe***@spampolice.com> wrote in message
news:42******@funnel.arach.net.au...
大家好,

我使用ASP Classic构建了一个在线购物车(基于'WebThang''
教程)。购物车页面(带有显示客户所选商品和费用的表格)只有3个按钮/链接。

1:返回商店:使用''javascript :history.go(-1)''转到上一页。

2:删除项目(购物车中每个项目旁边的一个):从
>会话变量数组重新显示页面。

3:结帐:很好地收集了收集客户的页面

我的问题:
如果用户点击删除项目链接/按钮,则页面会有效地重新显示,并从列表中删除所选项目。但是,如果
用户点击返回商店按钮或浏览器返回
按钮
(打算继续购物),购物车页面会重新显示
删除列表中的项目,就像它们删除之前一样。虽然
会话变量数组保持正确不变,但对于用户来说却非常混乱,并且可能会让他们觉得他们的购物清单已经搞砸了现在无效了。

我知道浏览器只是按照它所说的做,但需要找到一种方法来避免这种令人困惑的行为。


如果你使用location.replace在页面之间导航,旧页面会在历史堆栈中用新页面替换

,给你一些

有机会管理可以返回的东西。


-Mark

任何想法,

问候

Penny。
Hi all,

I''ve built an online shopping cart using ASP Classic(based on a ''WebThang''
tutorial). The shop cart page (with table showing customers selected items
and costs) has only 3 buttons/links.

1: Back to Shop: Uses ''javascript:history.go(-1)'' to go to previous page.

2: Remove Item(one next to each item in cart): Clears the selected item
from
the session variable array redisplays the page.

3: Checkout: Proceeds nicely to the pages that collect the customers
details.

My Problem:

If the user clicks the ''Remove Item'' link/button, the page efficiently
redisplays with the selected item removed from the list. However, if the
user then clicks either the ''Back to Shop'' button or the browser Back
button
(intending to continue shopping), the cart page redisplays showing the
removed item back in the list as it was before they removed it. Although
the
session variable array remains correctly unaltered it is very confusing to
the user and will probably cause them to feel that their shopping list has
been ''messed up'' and is now invalid.

I understand that the browser is just ''doing what it is told'' but need to
find a way to avoid this confusing behaviour.
If you use location.replace to navigate between pages, the old page gets
replaced in the history stack with the new page, giving you somewhat of an
opportunity to manage what''s available to go back to.

-Mark
Any ideas,

Regards

Penny.



嗨Mark,


您是否有任何我能看到的代码片段,以了解如何使用

location.replace?


问候


Penny。

" Mark J. McGinty" <毫米****** @ spamfromyou.com>在留言中写道

news:ui ************** @ tk2msftngp13.phx.gbl ...
Hi Mark,

Do you have any snippets of code I could see to get a perspective on how
location.replace can be used?

Regards

Penny.
"Mark J. McGinty" <mm******@spamfromyou.com> wrote in message
news:ui**************@tk2msftngp13.phx.gbl...

如果您使用location.replace在页面之间导航,旧页面在历史堆栈中被替换为新页面,为您提供了一些管理可用内容的机会。

-Mark

If you use location.replace to navigate between pages, the old page gets
replaced in the history stack with the new page, giving you somewhat of an
opportunity to manage what''s available to go back to.

-Mark



如果你不希望用户能够看到以前的页面(就像他们一样以前是
)你可能会阻止缓存:
http://support.microsoft.com/kb/234067/en-us


如果有效,请告知我们......
< br $>
Patrice


-


" Penny" < PE *** @ spampolice.com> aécritdansle message de

news:42 ****** @ funnel.arach.net.au ...
If you don''t want the user be able to see previous pages (exactly as they
were previously) you could likely prevent caching :
http://support.microsoft.com/kb/234067/en-us

Let us know if it works...

Patrice

--

"Penny" <pe***@spampolice.com> a écrit dans le message de
news:42******@funnel.arach.net.au...
大家好,
<我使用ASP Classic构建了一个在线购物车(基于'WebThang''
教程)。购物车页面(带有显示客户所选商品和费用的表格)只有3个按钮/链接。

1:返回商店:使用''javascript :history.go(-1)''转到上一页。

2:删除项目(购物车中每个项目旁边一个):从会话变量中清除所选项目
数组重新显示页面。

3:结帐:很好地收集客户的页面


我的问题:
如果用户单击删除项目链接/按钮,则页面会有效地重新显示,并从列表中删除所选项目。但是,如果
用户点击返回购物按钮或浏览器返回
按钮(打算继续购物),购物车页面会重新显示
已删除的商品在他们删除之前的列表中。尽管
会话变量数组保持正确不变,但对用户来说却非常混乱,并且可能会让他们觉得他们的购物清单已经混乱,现在无效。

我知道浏览器只是按照它所说的去做,但需要找到一种方法来避免这种令人困惑的行为。

任何想法,

问候

Penny。
Hi all,

I''ve built an online shopping cart using ASP Classic(based on a ''WebThang''
tutorial). The shop cart page (with table showing customers selected items
and costs) has only 3 buttons/links.

1: Back to Shop: Uses ''javascript:history.go(-1)'' to go to previous page.

2: Remove Item(one next to each item in cart): Clears the selected item from the session variable array redisplays the page.

3: Checkout: Proceeds nicely to the pages that collect the customers
details.

My Problem:

If the user clicks the ''Remove Item'' link/button, the page efficiently
redisplays with the selected item removed from the list. However, if the
user then clicks either the ''Back to Shop'' button or the browser Back button (intending to continue shopping), the cart page redisplays showing the
removed item back in the list as it was before they removed it. Although the session variable array remains correctly unaltered it is very confusing to
the user and will probably cause them to feel that their shopping list has
been ''messed up'' and is now invalid.

I understand that the browser is just ''doing what it is told'' but need to
find a way to avoid this confusing behaviour.

Any ideas,

Regards

Penny.



这篇关于后退按钮使ASP购物车项目移除变得复杂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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