Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

javascript function on content page load problem

Posted on 2006-07-23
9
Medium Priority
?
432 Views
Last Modified: 2012-06-21
HI All

I am playing around with MS Virtual Earth and have a problem getting the map to show on page load.  I am using a MasterPage site structure so on my content page i cant do <body onload='LoadMap();'>....no worries i would used ClientScript.RegisterStartupScript(GetType(), "map", "<script type='text/javascript'>LoadMap()</script>");
But i get a weird error in IE....i can see the map load in the background with my pin in the right place but then i get a popup.....
IE cannot open the internet site http://blah 
Opertation Aborted

In firefox the map loads without error but without my pin on the map...also a simple input button fails to work in firefox.....even when i only give it an alert to do???? Any ideas on that one.

The way i can get it to work in IE is to use the window_onload.....
<script language="javascript" type="text/javascript" for="window" event="onload">
   return window_onload()
</script>

But firefox ignores that.

so all in all i have a couple of problems and have ran out of ideas/reasons for why this is happening.

Any help greatly appreciated.  I will upload the page to the net somewhere so you can take a look if that would help?

Steve
0
Comment
Question by:osiris247
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17162750
Steve,

I haven't accessed Virtual Earth, but are you getting the site access steps correct.  

Also, have you seen this article?

Build an ASP.NET 2.0 Virtual Earth Map Custom Control
http://www.eggheadcafe.com/articles/20060708.asp

Bob
0
 
LVL 7

Author Comment

by:osiris247
ID: 17162770
ok...i kinda have it working.

window.onload=function()
{
  //load map stuff
}
although i still have the problems with firefox
1. the pin is loaded onto the map.  - i will try the virtual earth team for help with this one.
2. my input button is not running any code.
<input id="btnFind" type="button" value="Get Route" style="width: 109px"  onclick="alert('hello')" />
doesnt work in firefox....is there a reason for this that i am not aware of?

Steve
0
 
LVL 7

Author Comment

by:osiris247
ID: 17162789
Hi Bob.

I havent seen that article before, thanks.  I have been working from the Virtual Earth SDK. http://dev.live.com/virtualearth/sdk/

I am sure its something to do with firefox that i am unaware of....i dont know a great deal about the difference in browser support, normally more trial and error!! :)

I am sure the input button not running the alert() has something to do with the map not loading correctly in firefox.

cut out the code line by line....see what i get!!!

Steve
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 96

Expert Comment

by:Bob Learned
ID: 17162799
Steve,

I have played with Google Earth, and it is a significantly better product, so I can understand why Micro$oft feels the need to keep them from doing that without a challenge.  I read that this is an ongoing project, so it might change widely, if you look at Micro$oft's history of doing that.

Bob
0
 
LVL 7

Author Comment

by:osiris247
ID: 17162920
Bob, i agree.

I did origianlly want to use google maps but had problems getting it to even show in my page.

I got the key using my url and also localhost but neither worked....i think the problem with the key on my web space is the although the page is www.me.net, when uploading into my space (ftp) i need to go into www.me.net\www\ so might try again with that url.
Not sure about localhost....its quite a problem if i have to upload to web just to test.  Guess it could be that localhost is not public?!

as for the VE problem in firefox i am still not sure after having a look round... http://local.live.com/ works in firefox!?

Steve
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17162942
Steve,

I am not sure that I have enough information to be helpful with the Javascript problem.  I can't quite see the entire picture that you have described.

Bob
0
 
LVL 7

Author Comment

by:osiris247
ID: 17163047
Bob.

Not sure how to better explain it....you could take a look i have put it on the web... http://www.steveclements.net/Location.aspx
The problem is mainly in firefox....none of the map funcs work...nor does my find directions button.

i also just noticed, i have some javascript swapping an image on timer that doesnt work on the page with VE on.

Drop the guys at VE a message i think, see if i get a responce.

Steve
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1500 total points
ID: 17163065
Steve,

There are some very strange things that happen with Virtual Earth now.  If you zoom in too far, the picture disappears.   The way that the image redraws when you pan is very funky.  The zooming is way too sensitive.  I believe that Micro$oft has a ways to go to get this to be as easy to use as Google Earth.

I don't have FireFox installed to test this, and I am not going to install it unless I really need to.

Bob
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

648 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question