Select to view content in your preferred language

Graphics not displaying in Internet Explorer, but fine in Chrome / Safari

1112
2
Jump to solution
04-15-2013 04:11 PM
MichaelKnapp
Frequent Contributor
Hi there -

I've got a javascript api at: http://www.blueskiessolutions.net/NRC_Map/NRC_Web_Map.html

It works exactly as it should in Chrome and Safari, but the graphic points do not display in Internet Explorer. You can use the link above to see all the glorious code, but in general it displays points from a CSV file using javascript XMLHttpRequest object and arrays. I initially suspected an access permissions error to the CSV file, but this is not the case... IE is accessing it just fine.

I'm getting errors from a showLocation function, which fires during the body onLoad event:

<body class="claro" onload="showLocation();">

All I can tell so far is that the function doesn't seem to have access to anything else inside the page (variables, objects, etc.).

Has anyone run into this issue before? I'm hoping this is really obvious and I'm just being dense right now.

Thanks.

Mike Knapp
0 Kudos
1 Solution

Accepted Solutions
MarnikBlomme
Emerging Contributor
Hey Mike,

I've ran your page in Firefox and IE to see if there was any difference in behaviour. It looks that the function are called in a different order. In Firefox the init is called first followed by the showLocation function, which is the correct order. In IE it's just the other way around. IE first calls the showLocation and then the init function. So I assume the problem in IE is that the dojo isn't initialized yet.

You'll have to rewrite the the code to be sure the init functions are processed before using any esri objects.

Marnik

View solution in original post

0 Kudos
2 Replies
MarnikBlomme
Emerging Contributor
Hey Mike,

I've ran your page in Firefox and IE to see if there was any difference in behaviour. It looks that the function are called in a different order. In Firefox the init is called first followed by the showLocation function, which is the correct order. In IE it's just the other way around. IE first calls the showLocation and then the init function. So I assume the problem in IE is that the dojo isn't initialized yet.

You'll have to rewrite the the code to be sure the init functions are processed before using any esri objects.

Marnik
0 Kudos
MichaelKnapp
Frequent Contributor
Thanks Marnik.... that's a good catch. I noticed that if I toss the div tags into a table, then the page runs fine in IE. I'm not savvy enough to know if that ultimately switches the order the functions are executed, but I'd thought I was doing myself a favor during development to keep the HTML simple, which seems to have come back to bite me, but I think I'm back on track now... thanks again.

-Mike
0 Kudos