I have a program that uses Bing Maps, but the map only loads after the second search.
On my website, I have an Agency Locator that uses Bing Maps to locate and display agencies near a zip code. In Chrome and IE, the map loads fine. If I clear the cache in FireFox, the map doesn't show up on the first search. The second search displays fine. I am not quite sure if there is something wrong with my code or if it is a bug with FireFox, Bing Maps, or the two of them together. I am using FireFox V27.0 on a Windows 7 pc.
All Replies (7)
I forgot to mention that I had attempted running FireFox in safe mode with the plugins disabled.
URL of your website is?
Have you look in the Web Console for errors?
https://developer.mozilla.org/en-US/docs/Tools/Web_Console
http://www.howtogeek.com/105320/how-to-use-firefoxs-web-developer-tools/
http://www.auto-owners.com Hit ctrl + F5 to clear the cache. On the left hand side is a Find a Local Agency Section with a text box. Type in a zip code, I usually use 48917 or 49707. Hit find. For some reason, mine is working now, but my coworkers' FireFoxes aren't rendering the maps on the first search.
Mine is suddenly not working again. I tried it in safe mode again, and saw what my coworkers are seeing. Then, I tried it in normal mode and found that I am back to seeing what my coworkers are seeing.
Without doing {Ctrl + F5}, as I had never visited that page before.
Allowed all scripts to run. (I use NoScript in this Profile, as many experienced Firefox users do the prevent "surprises".)
Entered my ZipCode and hit Find. The search results loaded, but the Bing map didn't load, even after allowing the additional scripts for the 2nd page to load. Then checked the Web Console.
Looks like an error in the MapLOader.ashx file, or code that isn't applicable to Firefox.
TypeError: p_elSource.attachEvent is not a function - MapLoader.ashx:1
Then I tried again after doing a reload {Ctrl + F5}, entered ZipCode, hit Find, and the Bing map loaded properly, with no error in the Web Console. Another two attempts and it was back to not loading that map and showing that error - with or without bypassing the cache with {Ctrl + F5}.
I'm not a programmer and no nothing about ASP, but my guess is that something in the loading order is messed up or could be placed better in that ASHX script.
Maybe someone at the MozillaZine Web Development forum - http://forums.mozillazine.org/viewforum.php?f=25 - might have an answer. Beyond that, this forum is intended for Firefox user support, not too many contributors around here with web development expertise.
Thank you, I moved the question over to the other forum. Thank you for your help.
As an aside, I think attachEvent is a proprietary method of Internet Explorer. The script's method of browser detection might need to be updated.