3

I am working on a project where I need to Interact with browser Url bar. I mean I need too detect event with jquery/JS as soon as user clicks on address bar or type in there or if user clicks on another tab so to use with with callback and do the stuff. I know the browser is a OS app and has its own control but is there a way to accomplish this? Right now I am just detecting if user leaves Html from upper position.

Here is the code

co$(window).mouseleave(function(e){
    if(e.pageY<5)
    {
        //do stuff;
    }
});

Any thoughts will be appreciated

kapex
  • 28,903
  • 6
  • 107
  • 121
user2751232
  • 31
  • 1
  • 3
  • Whatever feature you are trying to implement - it seems like a bad idea to react or rely on things the user may does outside of your web page. If you really want to do that you'd need to create a browser plugin. – kapex Sep 05 '13 at 15:37
  • Thanks mate for Lead and i guess Browser plugin for this requirement can not be created in client or server web scripting languges any idea on this – user2751232 Sep 05 '13 at 15:41
  • Maybe something like this is sufficient: [detect if user changes tab](http://stackoverflow.com/a/10338754/897024). – kapex Sep 05 '13 at 15:45

1 Answers1

2

Unfortunately, you cannot tell when the user is interacting with the address bar.

loganfsmyth
  • 156,129
  • 30
  • 331
  • 251