IE experiencing error due to ExternalInterface.call

My menu screen is made up of separate flash movie buttons, each supposed to call a JavaScript function when clicked. While this works perfectly in Firefox, I'm experiencing issues in IE7 where it fails to execute. Unfortunately, I don't have access to IE6 for testing purposes. Here's the error message I receive in IE:

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

I'm having trouble identifying what the error on character 25 of line 1 might indicate. The error only occurs upon clicking the button, and even after attempting to debug with Visual Web Developer, it doesn't seem to be invoking the called function properly. Could the issue lie in the ExternalInterface.call mechanism?

The code within the flash movie is simply:

ExternalInterface.call('gohere',skip_id);

Where skip_id is passed as a flashvar into the movie, showing a valid value as it can be displayed in a textfield within the flash movie. Similarly, the JavaScript function is straightforward:

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

However, even with a breakpoint set and debugging attempted, the function does not seem to run. Interestingly, utilizing a javascript:gohere('id') link in the HTML screen works flawlessly. I've successfully used ExternalInterface.call in other areas of the project, and I'm stumped trying to spot any distinctions in implementation.

Any suggestions or insights would be greatly appreciated.

Answer №1

It appears that a dash was mistakenly included in the ID of the object tag, causing compatibility issues with Internet Explorer.

frustrating

Answer №2

I struggle with debugging these types of issues, especially in Internet Explorer. One technique I would use is to insert an "alert()" in my code to pinpoint the problem. Another strategy is to add line breaks in my JavaScript and observe if the error location shifts, helping me narrow down the issue.

On a related note, you can utilize a tool like IETester to preview how your webpage will display on IE 5.5/6/7/8RC1.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the process for importing a JavaScript file into a Vue component?

Having trouble importing JSON results into a Vue component? The results are as follows: [{"id":"d023c5e3-ca3c-4d97-933a-1112a8516eee", "score":9001, "updated":"2018-12-07T13:48:33.6366278", "player":Johanna, "category":Funny}, {"id":"398b65fb-e741-4801-b ...

Transform [object HTMLDocument] to a String

Could someone guide me in converting the newHTMLDocument object into a full string including the doctype and html tag? let newHTMLDocument = document.implementation.createHTMLDocument(); let html = `<!DOCTYPE html> <html> <head> ...

What are the best practices for implementing jquery owlCarousel within an Angular 4 component?

I've included my 'carousel.js' file like this: $('#owl-carousel-1').owlCarousel({...}); and in carousel.component.html, I have: <div id="owl-carousel-1" class="owl-carousel owl-theme center-owl-nav home- carousel">....< ...

Displaying iframes in AngularJS using a service

I am currently developing an Angular app and encountering some difficulties with rendering a Soundcloud embed iframe in my HTML. The issue arises when I try to display the tracks stored in the array generated by my getTracks function. Despite successfully ...

Hide element with jQuery if either of the two divs are currently visible

Initially, I have 2 hidden div elements: <div id="hidden1" style="display:none;"> <div id="hidden2" style="display:none;"> In addition, there is a visible div: <div id="visible" style="display:block"> A jQuery script ensures that only ...

Creating a tree structure from JSON data involves adjusting the entries as demonstrated below, utilizing programming languages for implementation

Data Entry: const info = [ { type: 'Electronics', category: 'cellphone', price: 800, profit: 50, }, { type: 'Clothing', category: 'shoes', price: 100, profit: 30, }, { ty ...

Is there a way to integrate PHP functionality into JavaScript?

When it comes to using JavaScript and PHP together, a common challenge is retrieving information from a database and utilizing that data in a JavaScript function. In my case, I need this functionality for implementing password change functionality on a w ...

Can you explain the difference between a public app and express.Application?

As I delved into the world of TypeScript and Node, I stumbled upon a perplexing line of code: public app: express.Application; This line is nested within the context of an import statement and a class definition. Let's take a closer look at it: i ...

Having trouble toggling the navbar on and off in mobile. Error message: Unable to read parentnode of undefined

When I try to make my mobile navbar full screen on a mobile device, the hamburger button works as expected when clicked. Initially, all the links are displayed in full page view, but once I click on a link, it disappears and takes me to the respective sect ...

The previous successful execution of req.body is now yielding an undefined value

My req.body is suddenly undefined, even though it was working fine a few days ago. I've tried using the deprecated body-parser module, but no luck. Here's my code: JS: var express = require("express"); var router = express(); require(& ...

stop the menu component from triggering a re-render

I am facing an issue where the menu opens and closes briefly when I refresh the page. I want to find a way to prevent this re-rendering process. Every time I refresh, my console.log shows: false 'open' navigation.jsx:23 item navigation.jsx: ...

Iterating Through Multiple Dimensions

I am facing a challenge with creating rules from three arrays that I have. The task is to generate every possible combination of entries from each array, but I am struggling with the logic required to write a function for this purpose. For example: var ar ...

Ways to programmatically compare all elements between two separate arrays

Is there a way to create a process where the first loop iterates through the elements of one array, while another loop goes through a second array and compares each element in the first array with all elements in the second array? For example: //first loo ...

Using JavaScript to manipulate the DOM in MSIE (Internet Explorer) and ensuring seamless processing

I am encountering an issue with simple HTML5 DOM processing not working on MSIE 9. It functions properly without a DOCTYPE tag, however, when I include the DOCTYPE html (indicating html5), MSIE 9 fails to process it. Is there an alternative approach I can ...

How can you convert a JavaScript object with nested arrays into JSON format?

I have been working with a JavaScript object that contains nested objects with associative arrays. I attempted to use the stringify function from the json2.js library, but the output did not include the arrays inside the nested objects. In my scenario, I b ...

What are some ways to design unique custom data grid toolbar elements?

I am having trouble syncing my custom toolbar buttons with the imported material data grid toolbar components. I would like them to match in style, specifically applying the material styles to my custom components. However, I have not been able to find a w ...

Scrolling to the latest message in Vuejs when a new message is received

I am currently working on a chat application, but I am facing an issue with scrolling to the bottom when new messages are received. I have attempted both methods: document.getElementById('msg_history').scrollTop = document.getElementById('m ...

What is preventing me from accessing the sub-elements of an AngularJS controller?

I know this question has probably been asked countless times before, but I'm struggling to find the right words to explain my specific issue. Essentially, I'm having trouble accessing something like $ctrl.thing.subelement. However, the following ...

How can we merge all the values of keys within an object into a new array using ES6?

My objective is to transform dynamic data into an array based on the keys of the toolset object, which does not have a constant number of keys. { toolset:{ info1:{ event-date:{}, event-time:{}, }, info ...

Three.js Troubleshooting: Texture Loading Issue

Having trouble retrieving a texture saved in a folder? Here's the error message I'm encountering: "GET file:///E:/Html/Expo%20Sites/Good%20Site/tex/dirt.jpg net::ERR_FILE_NOT_FOUND" I've followed the steps to get the texture, store it in ...