Reputation: 268
I want to open a popup window which should be on top when ever a link from its parent
page is clicked. For example when I click on a link (on a parent page) a popup window open and when I click on another link of parent page the previous popup window become on top of that parent page (and all other open browser's windows)
I have tried the following codes in that popup window HTML but with no luck.
<body onLoad="window.focus();">
and
<body onLoad="self.focus();">
and
<body onBlur="self.focus();">
Neither of these works. I am using Chrome browser if that helps. Please help!
Upvotes: 0
Views: 22666
Reputation: 701
Try adding .focus()
at the end of your popup window javascript (just before ;
)
Upvotes: 8