html - I need to open a new window in the background with JavaScript, and make sure the original is still focused -


I have a window that I am opening with the javascript function:

  function newwindow () {Window.open ('link.html', '', 'width =, height =, resizable = no'); }  

I need that once the new window opens, the focus returns to the original window. How can I do that? And where do I place the new code or code in the old one? Thanks!

It is known as 'pop-unders' (and generally it is ... But I want to retract). You should give Google a lot about it

You probably want to do something like this:

  var popup = window.open (...); Popup.blur (); Window.focus ();  

The focus must be set back in the original window (untested - pinched from Google). Some browsers can block this technique.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -