I think it's a Firefox setting that prevents it from occurring so you
don't have background windows automatically focusing on their own
(which annoys users).
In your FF Options > Content > Enabled Javascript as checked, click on
Exceptions, and see if "Raise or lower windows" is checked or not. I
think if it's unchecked, the window auto focus will not work. Try
checking it and see if it works. If it does, then that's the cause.

On Mar 26, 2:17 am, Mike <mgor...@gmail.com> wrote:
> I am trying to bring focus to window using jquery. The window is popup
> initiated through a button click on the parent page. I have some ajax
> calls going on in the child window, so data is being updated. My issue
> is that if the user clicks on the parent window and hides the child
> behind it, i would like to bring that child window back to the
> forefront if there is a data update.
>
> inside $(document).ready I wire up these events:
>
>   $(window).blur(function(){
>         WindowHasFocus =false;}).focus(function(){
>
>         WindowHasFocus =true;
>
> });
>
> Then, if data is updated, I call this function:
>
> function FocusInput(){
>      if(!WindowHasFocus){
>           $(window).focus(); }
>
> }
>
> This works as expected in IE8, but in FireFox(and all other browsers)
> the $(window).focus(); doesnt seem to do anything. Any suggestions/
> ideas on how achieve this?

Reply via email to