954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Open.window popup

hi
i need to open a new window using open.window to control some parameters, like window size, bars, scrollbars... the problem is that this way the brower blocks the window like if it was a popup...
is there any way to solve this?

if there is any other way to control the window parameters, like while its loading, feel free to post where, it would be much more usefull to me

thanks

DeOiD
Light Poster
30 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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
Moderator
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
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 

sorry, don't get it...

i'm using a normal page to open another page after 3 seconds, but only because i don't know any other way to control the window.

window.open("fgo.aspx","new ",
"toolbar=no,directories=no,status=no,titlebar=no,
menubar=no,scrollbars=no,resizable=no,width=800,
height=600,top=0,left=0")

what i meant was that if there is a way to control a window without using the first one with the javascript code above, it would be great...

thanks

DeOiD
Light Poster
30 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

What you are trying to do is exactly what popup blockers try to block.

stymiee
He's No Good To Me Dead
Moderator
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
 

i know, but that's what my boss wants...

it's amazing, so many new web technologies and theres no way to control the window parameters...

DeOiD
Light Poster
30 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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
Administrator
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
 

ok, my english limitations are creating some confusion here...

i'll try to explain what i need. my boss wants that when someone goes to (for example) www.xpto.com , the window appears without scrollbars, statusbars, toolbars... basically just the window frame and nothing more... the problem is that it appears that the only way to control these parameters is to open a new window using:

window.open("fgo.aspx","new","toolbar=no,directories=no,
status=no,titlebar=no,menubar=no,scrollbars=no,resizable=no,width=800,
height=600,top=0,left=0")

but this isn't what i want. if possible, i want to create this kind of window without using two pages, just one (fgo.aspx in this case)...

hope it helps understanding what i need.... and thanks for your help

DeOiD
Light Poster
30 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

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
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 

oh well, i really don´t care if it´s not possible, my boss will have to change is mind...

thanks

DeOiD
Light Poster
30 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

it is possible to open the window w/o scrollbars, toolbars, etc but it has to be based on the user action! Not automatically.

Voynex
Newbie Poster
15 posts since Jul 2007
Reputation Points: 6
Solved Threads: 3
 

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
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You