As long as you don't call it on a page load or something similar the pop up will open just fine. Basically, it has to be opened based on a user action (i.e. they click on a link). So it is not the code that is the issue, it is how the pop up is called.
stymiee
He's No Good To Me Dead
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
> if there is any other way to control the window parameters, like while its loading, feel free to post
Set the focus to the parent window, so that the newly opened window can load in the background and the user can browse the original page.
If you still don't get it, let me know.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
What you are trying to do is exactly what popup blockers try to block.
stymiee
He's No Good To Me Dead
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
I don't properly understand what you are trying to do here, but as far as I can make out, I guess you want to create a new window and allow it to load in the background while the user keeps on working with the original window.
// ee.html
<html>
<head>
<script>
function doSome()
{
var wnd = window.open("dd.html");
if(!wnd.opener)
wnd.opener = self;
}
</script>
</head>
<body>
<input type="button" value="Open Window" id="btn" onclick="doSome();" />
</body>
</html>
// dd.html
<html>
<head>
<script>
function shiftFocus()
{
opener.focus();
}
</script>
</head>
<body onload="shiftFocus();">
<div>This really is something.</div>
</body>
</html>
If not, then please specify which parameters you want to control.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
Wow, I have the power to block your boss! I will use it. BLOCK!!!!
The trick is to provide a button the USER clicks to open the window.
Any window which opens without the USER deciding to open it by clicking something is a popup ad.
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
AFAIK, no, you can't control the properties of something you don't create. Security reasons. The user is no sucker to come to your site only to find out his browser bare essentials have been stripped by some crazy developer...
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
I always HATE it when some clown of a webmaster decides I shouldn't have my carefully orchestrated toolbars. So I add that site to my "Don't go there" list.
I hate it even more when they somehow change my toolbar.
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182