UPDATE: I have found the issue with IE & pop-up blocking. It was not in fact the fault of SWFObject. Rather, the issue was a particular parameter entry: wmode=”transparent”
Yes, the simple removal of this entry caused IE’s pop-up blocking to cease. It appears I finally have a working solution – I tested on: XP (IE6, Firefox, Safari 3, Opera) & OSX (Firefox, Safari 3, Safari 2). The only caveat now being that the use of wmode=”transparent” causes IE to pop-up block.
Okay, I am putting this out to all of my readers…
I’ve almost got every browser working for my “_blank” clicks. The final exception is that on IE clicking is triggering a pop-up blocker. Surprisingly, it is not my code that appears to be the issue – or at least not directly – rather, it appears to be caused by the use of SWFObject to embed the .swf file. (We use SWFObject for our .swf embedding for a variety of reasons.)
Below are three links to my “Example 2” , each using a different loading method. Standard as generated by Flex, SWFObject 1.5, & SWFObject 2
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
If anyone can provide insight as to why the use of SWFObject is triggering the IE pop-up blocker, please, please let me know!
– The Saj
PS – Here are a few additional links on “_blank” issues. These demonstrate examples of using Callback, which I have not implemented but might consider incorporating.
I notice that it’s now a Nightmare with a capital “N” 🙂
Hmm….must be my sub-conscience expressing it’s frustratioN.
😉
Finally a solution that works (swfobject 1.5 and 2) in Firefox. Thanks! I also checked and it works on IE 6 and Safari 3.1 on Win. I didn’t test it on IE 7… It is sad such a basic functionallity is causing such big problems.
I came across this topic while searching for an answer on exactly the same problem. I’m using SWFObject but it seems to work on all browsers aside from IE7. Any insight would be much appreciated.
If I recall correctly, the wmode had an effect on IE. You can try changing it to “opaque” or “transparent” and seeing if that works.
That said, when you say “all browsers” did you test both Safari 2 & Safari 3. They behave much differently.
– Jason
Well, all of this is fine…..I really need to use wmode = “transparent” and that brings up the pop-ups blocked. And I’m not even asking the browser to open a new window…..not even asking for a target. No javascript to open anything new. And STILL I get the pop-ups blocked.
I am about to junk AS3, and go back to AS2, in which I have NO problems of this sort.
So far, I’ve not been able to use one AS3 script in Flash on my site, and I’ve had the new CS3 software for a WHILE.
Does anyone have a solution for my issue? Thanks, WCW
Hello
My name is Jonah Huggins, and I am a programmer trying to figure out a simple syntax problem that I am having with an AIR app that I am writing.
So here is what I am trying to do…
I am trying to send the text that is stored in a variable to my SQLite db. I have no idea what the syntax is but I know that it is simple…
Here is a bit of my code where the problem occurs.
private function postComment():void {
var commentVAR:String = commentText.text;
//Alert.show(commentVAR);
var q:SQLStatement = new SQLStatement();
q.text = “UPDATE data SET comment=commentVAR WHERE prim = 1”;
q.sqlConnection = conn;
q.addEventListener( SQLErrorEvent.ERROR, queryError );
q.execute();
//Alert.show(q.text);
}
As you can see I am trying to update a field by sending it the value of the variable “commentVAR”… We have tried countless syntaxes and researched for hours with no luck or example of what the syntax is for doing this simple thing, we have even tried just updating with commentText.text but “commentText.text” is what gets stored…
Ps. Everything else works great, but when we try to get the variable’s data stored in the db it just stores “commentVAR” instead.
If anyone could help me out on this it sure would be appreciated.
Thank you so much :
Jonah Huggins
@Jonah:
Try this:
q.text = “UPDATE data SET comment=”+commentVAR+” WHERE prim = 1″;
instead of;
q.text = “UPDATE data SET comment=commentVAR WHERE prim = 1″;
– Mary
@Jonah
I’m a new to flash/flex development, but it looks to me like you are pretty well set up for a SQL Injection attack on your database. If you are not familiar with these, read up on them before you go further. I wish that I could direct you around this, but again I am not familiar enough with this language to help you…
@Others
Any other thoughts? Am I correct about this?
@Jonah
As maryb33 points out, you need to use the + operator to concatenate your strings.
But more importantly, heed the advice of hobbes2k about SQL injection. Otherwise you will be in for trouble and headaches. Even non-attacks will cause trouble, for example if they put a ; in the text field.
Hi there,
I checked all three solutions here. All worked on a mac with firefox3. I looked at page source to see how one places the flash object into the HTML. That part I understood.
But what actionscript did you use to for the button?
I think you used Flex, right?
What I am trying to do is have my button (in flash) link to a page opening a blank firefox 3 window. So far no luck…
I could really use the help 🙂
Thanks
What have you tried so far? That might help us with a resolution.
Man, i did what u said, but still no success… Can u help me?
I copied and pasted your AS in one file, and on my MXML, I imported it, using it this way:
URLUtil.openWindow(“../includes/graficoHTML.php?filename=” + filename, “_blank”)
It should call this PHP, that writes an HTML with an image, that is passed by get(as u can see). As far as I see, my code is just like yours.
On the HTML generated by the Flex Builder, i´ve set every “allowScriptAccess” to “always”, and also on AC_OETags.js…
Still, everytime I click to open that URL, the Browser blocks it.
Can you pleeeeease help me out?
Dude you rule
thanks a lot for that great example, I’ve been reading & testing a couple already, this is the best so far !
Thanks for your work. When I publish a .swf from your fla (navigatetourl.fla) it works. But when I make my own fla and build it exactly like yours it doesn’t work. I’ve matched the fla’s perfect and the html pages are identical, but I can recreate your fix. Do you have any ideas?
Thanks!
Great man, thanks it did help!