Jump to content
xisto Community

Settimeout() & Focus() Not Working With Firefox

Recommended Posts

Hi Friends,I am new to javascript.Just a few days back I had encountered a problem where focus() doesn't work well with FF, and Kravvitz showed me a workaround by using setTimeout();Now I have a similar problem:1. I open a new blank window using 'window.open()'2. I alert the user that I am going to add some HTML to it.3. I add the HTML to that new window, and4. I bring focus to that new window.It works beautifully in IE7 but not in FF.

var newWindow = window.open("", "myWindow", "width=300, height=300");alert("Going to add html");newWindow.document.write("Hi");setTimeout("newWindow.focus()", 10); //newWindow.focus(); also doesn't work!

Thank You for your timeCheers!!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.