javascript - window.onunload fires and then the user clicks stop -


here flow trying figure out.

  • user hits page.
  • user clicks link , onbeforeunload , unload fired. here getting rid of href in of links.
  • the page hangs little bit giving user chance hit stop button in browser.
  • since page still on original page (not new page requested , stopped) hrefs still blank.

is there way of knowing if user clicks stop button , still on same page?

the way can think off top of head put settimeout in onbeforeunload or unload don't because there many variables still being messed up.

what ended doing this:

window.unload = function(){     var _href = $('selector').attr('href');     $('selector').attr('href', '');      settimeout(function(){         $('selector').attr('href', _href);     }, 1500); }

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -