Skip to content Skip to sidebar Skip to footer

How To Perform A Knockout.js Action Before Following An ?

I came across this issue while working with knockout.js and Html5, I haven't found how to handle it, though. In here, what matter the most is performing a click-binding right befor

Solution 1:

That's a classical case.

You try to execute some js scripts, but in the same time, your browser is redirecting to the href.

To fix this, if you are using angular, you can use promises; otherwise, you have to stop the event propagation, process to you stuff, and then, redirect to the link.href attribute when done.

Solution 2:

Its performed client side, test my fiddle here

http://jsfiddle.net/zXWTW/1/

My guess is the ajax request does not start before the page is unloaded

Post a Comment for "How To Perform A Knockout.js Action Before Following An ?"