Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-07-2006, 01:52 AM   PM User | #1
JayStang
Regular Coder

 
Join Date: Jan 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
JayStang is an unknown quantity at this point
Javascript popup blocker workaround?

Hey Guys,
I'm trying to make a popup. Let me rephrase, not the type of popup that we all have cursed upon! But the same concept. I have a "control panel" type web application that i have developed. It is all completely dynamic. Each application has its own index.php file. My problem is, one of my applications i need has to open in a new window since its an external site. My problem is the way i have it setup dynamically in php i MUST have that inital index.php file. So what i have tried is to put in that index file just some javascript that opens a new window. Of course both IE and FF's popup blocker kick in. I need to find away around this. Does anyone have any ideas? So far i'd tried a window.open.... also tried creating a link with a target and id and then using click(); to deploy it. And i even tried creating a fake form with a target and an id and submiting it with javascript. Everything gets blocked.

Thanks in advance,
Jamie
JayStang is offline   Reply With Quote
Old 11-07-2006, 03:06 AM   PM User | #2
rubenbuhr
Regular Coder

 
Join Date: Oct 2006
Posts: 107
Thanks: 3
Thanked 5 Times in 5 Posts
rubenbuhr is an unknown quantity at this point
Quick thought, a 1x1 iframe?
rubenbuhr is offline   Reply With Quote
Old 11-07-2006, 03:22 AM   PM User | #3
JayStang
Regular Coder

 
Join Date: Jan 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
JayStang is an unknown quantity at this point
i'm not sure if i understand... how would i make it open a new window with an iframe?
JayStang is offline   Reply With Quote
Old 11-07-2006, 07:32 AM   PM User | #4
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,101
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by JayStang View Post
So what i have tried is to put in that index file just some javascript that opens a new window. Of course both IE and FF's popup blocker kick in. I need to find away around this. Does anyone have any ideas? So far i'd tried a window.open.... also tried creating a link with a target and id and then using click(); to deploy it. And i even tried creating a fake form with a target and an id and submiting it with javascript. Everything gets blocked.

Thanks in advance,
Jamie
Forget it. Pop-up blockers are designed to stop exactly what you are trying to do. If they could be circumvented every spammer in the universe would have done it already.
Philip M is offline   Reply With Quote
Old 11-07-2006, 10:02 AM   PM User | #5
ess
Regular Coder

 
Join Date: Oct 2006
Location: United Kingdom
Posts: 865
Thanks: 7
Thanked 29 Times in 28 Posts
ess will become famous soon enough
Hi JayStang,

Personally, I agree with rubenbuhr. I think it is the best and easiest solution to this problem.

To learn more about IFrames, you should google search IFrames and how to implement one. I found this website which give a quick overview of IFrames are used within a page.

I could think of other solutions to this problem. Such as using Ajax to populate contents needed from the other server. (I know, there is a security thing which does not allow you to connect to another server...but I have a work around for that). But they all rely on JavaScript and I think you should stick to using an IFrame.
ess is offline   Reply With Quote
Old 11-07-2006, 12:50 PM   PM User | #6
JayStang
Regular Coder

 
Join Date: Jan 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
JayStang is an unknown quantity at this point
hi ess, thank you for the responce. I know what an iframe is and i've used them a good bit. I just don't understand how that will help me open a new window?
JayStang is offline   Reply With Quote
Old 11-08-2006, 02:02 AM   PM User | #7
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Check this out
http://www.dynamicdrive.com/dynamici...htmlwindow.htm
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 11-08-2006, 02:41 AM   PM User | #8
JayStang
Regular Coder

 
Join Date: Jan 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
JayStang is an unknown quantity at this point
Quote:
Originally Posted by _Aerospace_Eng_ View Post
wow... not quite how i want it but thats pretty damn cool!... thanks Areospace!
JayStang is offline   Reply With Quote
Old 08-14-2009, 04:23 PM   PM User | #9
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,101
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by riteshms View Post
There is a way to do it, read on
Oh dear! You have not read what Stephen Chapman says:-

"I can't guarantee that your popup will appear if you code it this way. All I can guarantee is that your popup will have a better chance of making it past the blockers if coded like this as it makes it more obvious to the popup blockers that the popup window has actually been requested by the person viewing the page and is not being generated automatically."

This does not enable unrequested or automatic pop-ups to get through. It merely helps if the pop-up has actually been requested and the browser does not recognise this.
Philip M is offline   Reply With Quote
Old 08-14-2009, 06:05 PM   PM User | #10
riteshms
New to the CF scene

 
Join Date: Aug 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
riteshms is an unknown quantity at this point
true !
But I have tested on IE6, Firefox 3.5, chrome, Opera.
It seems fine.
riteshms is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:05 AM.


Advertisement
Log in to turn off these ads.