Preventing links

12 views
Skip to first unread message

christia...@invativa.se

unread,
Jan 23, 2014, 5:10:33 AM1/23/14
to 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

unread,
Jan 23, 2014, 7:14:23 AM1/23/14
to 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!
Reply all
Reply to author
Forward
0 new messages