IE Pop-up Blocker issue...

440 views
Skip to first unread message

Jason Nxtbook

unread,
Feb 11, 2008, 3:04:30 PM2/11/08
to SWFObject
I am running into an issue with SWFObject, and pop-up blocking in IE.

It seems to be a result of SWFObject because if I use the standard
HTML template generated by Flex Builder, it works without problem. But
if I use either SWFObject 1.5/2.0, then the click that launches
"http://www.domain.com", "_blank" results in a pop-up block by IE.

Has anyone else had this or a similar problem?

Jason Nxtbook

unread,
Feb 12, 2008, 4:43:30 PM2/12/08
to SWFObject
Follow-up with examples:

I am having issues with IE pop-up blocker being triggered when using
either SWFObject 1.5 or SWFObject 2.0 to embed a .swf created in Flex.

***

Below are three links to “Example″ , each using a different loading
method. Standard as generated by Flex, SWFObject 1.5, & SWFObject 2.
All three are loading the the same .swf, so the only real difference
is SWFObject.

http://www.easternstorm.net/sassie/example2/example2.html

http://www.easternstorm.net/sassie/example2/example2-swfobject.html

http://www.easternstorm.net/sassie/example2/example2-swfobject2.html

Has anyone else encountered this situation?

If anyone can provide insight as to why the use of SWFObject is
triggering the IE pop-up blocker, please, please let me know!

Jason Nxtbook

unread,
Feb 13, 2008, 3:41:56 PM2/13/08
to SWFObject
After further research, the issue was NOT with SWFObject, but rather
caused by a particular parameter entry:

wmode="transparent" causes IE to pop-up block.

I have posted a solution on my blog. I have tested it on XP in IE,
Firefox, Safari 3, Opera and on OSX in Firefox, Safari 3, Safari 2

http://thesaj.wordpress.com/2008/02/12/the-nightmare-that-is-_blank-part-ii-help/

Exceptions:
1. Requires use of "allowScriptAccess"
2. Fails in IE when wmode property = "transparent"

So there we have it, a solution for most instances for most browsers!

philip

unread,
Feb 14, 2008, 12:33:25 PM2/14/08
to SWFObject
hate to break it to you, but all of your "click test" examples on your
blog are being blocked in my IE6 (WinXP). all of your "click test 2"
buttons fail and generate an "object is null" error in IE6, too.

this is definitely not a SWFObject issue... it's due to security
issues with ActionScript 3's navigateToURL feature
http://kb.adobe.com/selfservice/viewContent.do?externalId=50c1cf38&sliceId=2

pages generated using Flash CS3's publish feature suffer the same
issues.

for what it's worth, links using AS2's getURL don't get blocked.

i see you've already hit the 'bug report' page for navigateToURL:
http://bugs.adobe.com/jira/browse/SDK-12987

some people have devised workarounds, but i don't know how well they
work or in what situations:

http://skovalyov.blogspot.com/2007/01/how-to-prevent-pop-up-blocking-in.html
http://flexgraphix.com/blog/?p=16


- philip



On Feb 13, 12:41 pm, Jason Nxtbook <thesa...@gmail.com> wrote:
> After further research, the issue was NOT with SWFObject, but rather
> caused by a particular parameter entry:
>
> wmode="transparent" causes IE to pop-up block.
>
> I have posted a solution on my blog. I have tested it on XP in IE,
> Firefox, Safari 3, Opera and on OSX in Firefox, Safari 3, Safari 2
>
> http://thesaj.wordpress.com/2008/02/12/the-nightmare-that-is-_blank-p...

Jason Nxtbook

unread,
Feb 14, 2008, 3:59:39 PM2/14/08
to SWFObject
I am fully aware of the navigateToURL() issue. In fact, I'm trying to
implement a universal work-a-round. I do apologize as the examples are
in a bit of flux.

Yes, right now, in IE if wmode="transparent" is turned on. Than you
get the pop-up. I've found code that works around that, but I am
having trouble implementing it because of SWFObject.

If I click on this example, then I see the userAgent data.
http://www.easternstorm.net/sassie/example2/example2.html

Neither of the examples using SWFOject return the userAgent.
http://www.easternstorm.net/sassie/example2/example2-swfobject.html

http://www.easternstorm.net/sassie/example2/example2-swfobject2.html

So why does the following code fail in IE while using SWFObject, and
but work?

var browserAgent:String = ExternalInterface.call("function getBrowser()
{return navigator.userAgent;}");

But works if I use the standard embed code generated by Flex Builder
3. So this is looking more and more like a bug in SWFObject's
handling to me. Or perhaps mere lack of knowledge on my part for the
need to address the objects differently.

- The Saj

Jason Nxtbook

unread,
Feb 14, 2008, 5:07:16 PM2/14/08
to SWFObject
Okay, there is CLEARLY an issue with SWFObject 2.0 and userAgent info
retrieval via externalInterface.

Screenshot...
http://www.easternstorm.net/sassie/useragenttest/versionresults.jpg

On the left side observe IE6 loading the same swf, embedded in
standard Flex 3, SWFO 1.5, SWFO 2.0. Please note that that in SWFO
2.0 we receive "null".

Now, the left two columns shows several other browsers loading the 3rd
template:
http://www.easternstorm.net/sassie/useragenttest/useragenttestSWFO20.html

Note that it is working fine on Firefox XP, Safari 3 XP, Opera XP,
Firefox OSX, Safari 3 OSX. The only other exception being Safari 2,
which has known issues with externalInterface as I recall.

So clearly there is something not quite right with SWFObject 2.0
running IE6

Jason Nxtbook

unread,
Feb 14, 2008, 5:10:45 PM2/14/08
to SWFObject
Here is the source code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" viewSourceURL="srcview/index.html">

<mx:Script>
<![CDATA[

private function Test():void{
Debug.text = "<<" + ExternalInterface.call("function getBrowser()
{varBrowser = ''+ navigator.userAgent;alert(varBrowser);return
varBrowser;}") + ">>";
}
]]>
</mx:Script>

<mx:VBox x="10" y="10">

<mx:Button id="btnTest" label="Click to View userAgent Info"
click="Test()"/>

<mx:TextArea id="Debug" width="450" color="Navy" borderColor="Red"/>

</mx:VBox>

</mx:Application>

philip

unread,
Mar 3, 2008, 1:00:30 PM3/3/08
to SWFObject
hi all

i was just re-reading this post (someone posted a similar topic on the
swfobject forum) and thought i should point out a mistake of mine. i
mentioned getURL would work fine, but I was mistaken: getURL WILL be
blocked, as will navigateToURL.

"In Adobe Flash Player 9 update 3 (v9.0.115.0), calling getURL (or its
ActionScript 3.0 equivalent, navigateToURL) does not work properly
when the calling Flash Player movie (SWF) file is located in a
different domain than its hosting HTML page. An exception to this
issue is when the target name is "_blank" or the HTML parameter
AllowScriptAccess is set to "always.""

http://www.adobe.com/go/50c1cf38

sorry for any confusion.

- philip


On Feb 14, 9:33 am, philip <platelu...@gmail.com> wrote:
> hate to break it to you, but all of your "click test" examples on your
> blog are being blocked in my IE6 (WinXP). all of your "click test 2"
> buttons fail and generate an "object is null" error in IE6, too.
>
> this is definitely not a SWFObject issue... it's due tosecurity
> issues with ActionScript 3's navigateToURL featurehttp://kb.adobe.com/selfservice/viewContent.do?externalId=50c1cf38&sl...
>
> pages generated using Flash CS3's publish feature suffer the same
> issues.
>
> for what it's worth, links using AS2's getURL don't get blocked.
>
> i see you've already hit the 'bug report' page for navigateToURL:http://bugs.adobe.com/jira/browse/SDK-12987
>
> some people have devised workarounds, but i don't know how well they
> work or in what situations:
>
> http://skovalyov.blogspot.com/2007/01/how-to-prevent-pop-up-blocking-...http://flexgraphix.com/blog/?p=16
>
> -philip

Bobby

unread,
Mar 3, 2008, 2:59:19 PM3/3/08
to SWFObject
Reply all
Reply to author
Forward
0 new messages