DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   How does IE determine a popup? (http://www.daniweb.com/forums/thread66755.html)

evank Jan 9th, 2007 1:07 am
How does IE determine a popup?
 
I'm trying to design a site that makes use of
the window.open() javascript method by opening certain links in a new window with a specific pixel size and position onscreen, but Internet Explorer (with default security settings) blocks most attempts...Is there any way around this, to let IE know that its a legitimate site? Or does anyone know exactly what criteria IE looks at in determining popups?

All the pages opened are in the same site, under the same domain, and most of them are even served from the same directory. I just need to open them at a certain position on-screen, and have them be a certain size, and window.open() seems like the correct way to do this.

MattEvans Jan 10th, 2007 3:03 pm
Re: How does IE determine a popup?
 
Using the target _blank attribute on a hyperlinked anchor tag is generally more likely to get past popup blockers...

That's not so good because you can't control the spawned window's size directly or open the new window automatically.

Some popup blockers would object to this kind of popup aswell O_O

Dukane Jan 10th, 2007 9:09 pm
Re: How does IE determine a popup?
 
NO there is no way to do that. If there was, then every site would do it so their popups dont get blocked!

Godfear1 Jan 11th, 2007 12:51 am
Re: How does IE determine a popup?
 
I'm going to have to agree with Dukane, I looked for information but it looks like all popup windows are blocked.

evank Jan 11th, 2007 10:33 pm
Re: How does IE determine a popup?
 
i just dont understand why microsoft can't make even a simple web browser that works :(

well, the solution ive come up with is to just use target="_blank" links, then resize and relocate the window as it loads. its pretty hacky, but its the only thing that works in IE under default security settings. plus it has a degree of degredation for when javascript is disabled altogether.

thanks all, i appreciate the advice!

Godfear1 Jan 13th, 2007 12:58 am
Re: How does IE determine a popup?
 
Quote:

Originally Posted by evank (Post 300388)
thanks all, i appreciate the advice!


Thank you. I like your solution by the way. Its creative.

MidiMagic Jan 22nd, 2007 1:58 pm
Re: How does IE determine a popup?
 
If I turn the popup blocker on, it's because I don't want popups.

Inny Jan 22nd, 2007 3:43 pm
Re: How does IE determine a popup?
 
have you tried this?

<script>

function openpage(){
//set this to the file of the page.html
var pagefile="YOUR PAGE HTML HERE"

if (document.all)
pagewindow=window.open(pagefile,"","width=445,height=250")
else
pagewindow=window.open(pagefile,"","width=445,height=250,scrollbars")
}
</script>

<a href="javascript:openpage()">OPEN PAGE CLICK HERE</a>

always better to give folk a choice when it comes to popups if possible imo. :D

MidiMagic Jan 22nd, 2007 4:06 pm
Re: How does IE determine a popup?
 
Why not just put an anchor tagged link on the page. If I want the extra page, I will click it. I don't need bamboozlers popping up to attract me to the link.

Inny Jan 22nd, 2007 4:14 pm
Re: How does IE determine a popup?
 
Yep thats the idea, it only pops up if the link is clicked (see above)


All times are GMT -4. The time now is 3:53 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC