Preventing links

已查看 12 次
跳至第一个未读帖子

christia...@invativa.se

未读,
2014年1月23日 05:10:332014/1/23
收件人 sam...@googlegroups.com
I have a page with a lot of forms for the user to fill in. I want to stop the user from redirecting to another link by accident.

What I have setup is a message dialog that prompts user if he/she wants to abort/continue. This works in all browser except chrome which I have a nasty bug that I do redirect on continue but I redirect 2 times and always end up on the same page I am already standing!

I am remaking it now and my question is.

How do I stop a route from executing and not block more clicks to that route.

I am using the .around method and return false if the user should see a message box. This works once, but the next time I try to redirect to the same page .around is not fired. How can this be achieved?

christia...@invativa.se

未读,
2014年1月23日 07:14:232014/1/23
收件人 sam...@googlegroups.com
To me it seems the around method is not working as expected.

When changing the url using (after user pressed continue):
window.location.href = " newurl"

the around (function(callback)) has empty method in callback in FF, but it is not empty in chrome!
回复全部
回复作者
转发
0 个新帖子