ExternalInterface.call throws error in IE

I have a menu screen that, for various reasons, consists of several buttons in the form of separate flash clips. When a button inside these movies is clicked, it is assumed that the javascript function is being called on the appropriate page. It works fine in firefox, but currently doesn't work in IE7. I don't have IE6 to test. This is the error I am getting in IE:

Line:1
Char:25
Error: Expected ';'
Code:0

      

I can't seem to find what char 25 line 1 might mean. I get an error when I click on a button and after installing Visual Web Developer to try and get some actual debugging, it looks like it doesn't actually run the called function. so it seems like the error is happening in what mechanism actually makes ExternalInterface.call work?

The code in the flash movie is literally simple:

ExternalInterface.call('gohere',skip_id);

      

If the skip_id is passed to the movie as a flashvar - it seems to get a tangible value, since I can print it to a text box inside the flash movie. The javascript function is equally tricky:

function gohere(i){
    lo.skipto(i);
}

      

But as I said, it doesn't even show up if I put a breakpoint here and debug it. If I put a javascript: gohere ('id') link on the html screen and click that it works fine. I have ExternalInterface.call working in other parts of the same project, and I can't see any differences in the way it was implemented during my life.

Ideas?

+1


a source to share


2 answers


It turns out I have - in an object tag id that IE doesn't accept at all.



sigh

+1


a source


I'm terrible at debugging things like this, even in IE, so I would put "alert ()" on my turn to start. Then I would start adding carets to my javascript and see if the line is moving with error and calculate it by outputting.



aside, there is a piece of software called IETester that should show you what your page will look like in IE 5.5 / 6/7 / 8RC1.

0


a source







All Articles