View Full Version : getURL, "innerHTML" and IE == problem

03-17-2005, 03:56 PM
Here's the problem I've identified, and have been unable to solve or find similiar posts.

The setup:

0. Using Internet Explorer 6

1. A flash SWF with "getURL('javascript:myFunc()')" on a series of mcs

2. The containing html page has a set of tabs, that change the innerHTML property of a separate <div id="uniqueID"></div> tag.


1. clicking the movie clips (firing getURL("javascript..")) in the SWF results in expected behavior. (Good)

2. clicking the html tabs (resulting in new html getting generated) works as expected. However, returning to the SWF and clicking the movieclips will occationally result in the "javascript:.." code appearing in the browsers url field.. meaning the browser tries to open the code as a page instead of processing it as javascript. (Bad)

Anyone else run into this problem? It appears that manipulating the innerHTML of an object (unrelated to flash swf) causes the browser's javascript engine to fail to recognize flash's getURL() command

Am going to try slapping in FSCommand to see if I get the same behavior.

thank you,

03-17-2005, 07:17 PM

see if that helps.

03-17-2005, 08:11 PM
Thanks for the idea.. I gave it a try, without any affect. Am working on narrowing the problem down further. Haven't been able to duplicate problem with a simple test swf/html. Will post what I find.

03-17-2005, 09:21 PM

Here's a demo of the problem:


If you click the link, then the orange movieclip and back repeatedly, within 2-3 cycles the browser will go blank with either "javascript:test().." in the url or the original url.

Problem only occurs in IE6, not in IE5.01. IE5.5 displays the javascript:test(etc) in the url but the page doesn't change. Its been replicated on other folks computers.

The flash file has a single symbol instance (my_mc) and this code:

my_mc.onPress = function() { this._x++; this._y++; }
my_mc.onReleaseOutside = function() { this._x--; this._y--; }

my_mc.onRelease = function() {
this._x--; this._y--;

Any ideas would be appreciated.. Am going to try alternatives to innerHTML..


03-18-2005, 09:09 PM
The fix: is to add the "void(0);" to the HTML link... not (just) the flash link.

Thank you very much TJ.