User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 425,935 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,613 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4701 | Replies: 12
Reply
Join Date: Apr 2007
Location: Portugal
Posts: 26
Reputation: DeOiD is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
DeOiD DeOiD is offline Offline
Light Poster

Help Open.window popup

  #1  
Jul 19th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Rep Power: 5
Solved Threads: 34
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Open.window popup

  #2  
Jul 19th, 2007
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.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,855
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Open.window popup

  #3  
Jul 19th, 2007
> 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.
Last edited by ~s.o.s~ : Jul 19th, 2007 at 12:48 pm.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: Apr 2007
Location: Portugal
Posts: 26
Reputation: DeOiD is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
DeOiD DeOiD is offline Offline
Light Poster

Re: Open.window popup

  #4  
Jul 19th, 2007
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
Reply With Quote  
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Rep Power: 5
Solved Threads: 34
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Open.window popup

  #5  
Jul 19th, 2007
What you are trying to do is exactly what popup blockers try to block.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote  
Join Date: Apr 2007
Location: Portugal
Posts: 26
Reputation: DeOiD is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
DeOiD DeOiD is offline Offline
Light Poster

Re: Open.window popup

  #6  
Jul 20th, 2007
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...
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,855
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Open.window popup

  #7  
Jul 20th, 2007
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.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,556
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 115
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Open.window popup

  #8  
Jul 20th, 2007
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.
Last edited by MidiMagic : Jul 20th, 2007 at 5:41 pm.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Apr 2007
Location: Portugal
Posts: 26
Reputation: DeOiD is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
DeOiD DeOiD is offline Offline
Light Poster

Re: Open.window popup

  #9  
Jul 21st, 2007
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
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,855
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Open.window popup

  #10  
Jul 21st, 2007
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...
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 9:18 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC