IE8 error

1649
14
08-03-2011 05:50 AM
DavidMurray
New Contributor
Hi,

I am currently developing an application which displays the map without errors in Firefox, Safari, and Chrome, but when I open it in IE8 I get the following message:

Webpage error details

Message: Invalid argument.
Line: 14
Char: 56639
Code: 0
URI: http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4


I have added the <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" /> at the top of the ASP file so compatibility should be ok.

Any ideas on what the cause maybe?

Mnay thanks
David
0 Kudos
14 Replies
DavidMurray
New Contributor
After some testing and head scratching the error was being caused by a <div> tag in the html.  Not sure why it was causing an issue but once removed the site now works in IE.

Thank you to everyone for your advice.

David
0 Kudos
MichaelGinzburg
Occasional Contributor II
Hello David!

I have a similar problem.
Where was your <div> located?
Can you post this part of the HTML?

Thanks!
0 Kudos
DavidMurray
New Contributor
It was the <div> located before <div> containing the map.  Also there was a transparent style attached to the <div> which may have caused the problem.  

Here is HTML code in my page:

   <div id="resultsContainer" style="display: block; position:absolute; width:750px;left:3px;top:160px;z-index:999999;padding:0px;background:url(images/resultsBG.png) repeat;"> 
   
   <!--<div id="resultsHeader" style="display: block; position:absolute; width:100%;left:0px;top:2px;height:20px;z-index:999999;padding:0px;background:url(images/headerbar.png) repeat;">
   <img src='images/cancel.jpg' alt='Close Results' style='position:absolute;right:10px;top:3px;cursor:pointer;' onclick='closeResults();'/>
   </div>-->
   
   </div>
    
   <div id="map"></div>
   <div id="panbuttoncontrols" style="position:absolute;left:10px;top:170px;"  >
    <img id="panup" style="position:absolute;left:34px;top:7px" src="images/panUp_off.png" onClick="javascript:panMap('n')" onMouseOver="togglePanImage('panUp_on')" onMouseOut="togglePanImage('panUp_off')" >
    <img id="panright" style="position:absolute;left:58px;top:42px" src="images/panRight_off.png" onClick="javascript:panMap('e')" onMouseOver="togglePanImage('panRight_on')" onMouseOut="togglePanImage('panRight_off')" >    
    <img id="pandown" style="position:absolute;left:34px;top:62px" src="images/panDown_off.png" onClick="javascript:panMap('s')" onMouseOver="togglePanImage('panDown_on')" onMouseOut="togglePanImage('panDown_off')" >
    <img id="panleft" style="position:absolute;left:0px;top:42px" src="images/panLeft_off.png" onClick="javascript:panMap('w')" onMouseOver="togglePanImage('panLeft_on')" onMouseOut="togglePanImage('panLeft_off')" >    
   </div>


Hope this helps

David
0 Kudos
BlairShaman
New Contributor
For what it's worth, I was getting the same error with the following line in IE 8:
[INDENT]map.infoWindow.resize(135, 35);[/INDENT]


I changed it to this to fix it:
[INDENT]dojo.style(dojo.byId('map_infowindow'), "height", "35px");[/INDENT]
[INDENT]dojo.style(dojo.byId('map_infowindow'), "width", "135px");[/INDENT]


Blair
0 Kudos
AndrewBrown1
Occasional Contributor II
I'm running into a similar issue. The weird thing is that this error only occurs when the page is loaded from the website. If I run the code locally on my machine, and connect via localhost, the page loads and no errors are thrown.

Once the page is uploaded to the web machine and I try to view it from my browser, I receive these errors on IE's console:

  'this._div' is null or not an object
Error: Invalid argument.
Error: Invalid argument.

The map layers never load, but the basic layout does. I checked all of my <div> tags and there aren't any extras, nor are any missing.

What's the best method to try and figure this out? I've been using JSLint to find any errors, including missing semicolons, but using IE's debugger is a pain.

Thanks.
0 Kudos