1

Is there anyway some how I can bring popup window behind the main browser and bring the browser window in front. Here's what I am trying :

var w = window.open('google.com','Popup window');
setTimeout(function() { w.blur();window.focus();},100);

Works in Firefox after enabling advanced settings for JavaScript. Not for Chrome, Safari and other browsers.

Any help would be highly appreciated.

Erik Schierboom
  • 16,301
  • 10
  • 64
  • 81
imVJ
  • 424
  • 4
  • 16
  • 1
    Nowadays browsers (and all ad blockers afaik) are tailored to prevent pop-unders (since in 2013 pop-under = spam most of the time), I'd suggest you reconsider your design – Alex Jul 17 '13 at 12:43
  • Thanks Erik, Alex. @ABertil jsfiddle for?? – imVJ Jul 17 '13 at 12:55

1 Answers1

2

According to that post, window.focus() won't work on Chrome because it is disabled. It might be the same for Safari.

Community
  • 1
  • 1
AGuif
  • 153
  • 11