GetMap() works as a button event but not inline. Problem ONLY in IE

A

AAaron123

If I run in Safari or FireFox on my Windows XP it works OK. But in IE7 I get
the mesage that:

IE cannot open the site http://localhost:4272/VEMap/map.aspx

If I comment out the last line of GetMap, IE does not bomb (nor do I get the
map)

With that line not commented out if I comment out:

<script type="text/javascript"> GetMap();</script>

the button btnGetMap works Ok (map displays)

I have the IE developer toolbar and firebug but don't see how they can help!

I think the fact that the button works must be a strong clue but I don't
know how to debug javascript. No breakpoints, right?

You should also know that the Map displays in the page behind the dialog box
announcing the error. As much of the page as I can see looks OK. So why is
IE complaining?



Can you figure this out?







<asp:Content ID="Content2"... this goes into the master body

<div id="VirtualMap" style="position: relative; width: 800px; height:
800px;" >

<input id="btnGetMap" type="button" value="Get Map" name="btnGetMap"
onclick="GetMap();" />

<br />



<script type="text/javascript"> GetMap();</script>

</div>

====

<asp:Content ID="Content1" ...This goes into the master head

<script type="text/javascript">

function GetMap() {

map = new VEMap('VirtualMap');

map.LoadMap(StartPoint, 4, VEMapStyle.Road, false, VEMapMode.Mode2D, true,
4);

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top