Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-27-2008, 06:06 PM   PM User | #1
lefthandedpants
New to the CF scene

 
Join Date: Oct 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
lefthandedpants is an unknown quantity at this point
Unhappy Google Maps API and Javascript problem. Works in Firefox, why not IE?

First, I apologize if you've seen this question elsewhere, but i wasn't sure exactly where to post it because it's facets overlap with respect to technical categorization.


I have implemented the Google Maps API and some javascript to create an application that determines product shipping distance using the Google Maps API and displays relevant content in a certain DOM element when the Google Map is refreshed.

Check it out here: http://www.schwebdesign.com/zooktemp/map5.php
Use Firefox first. It works fine doesn't it? It does for me. Firebug and the Web Developer Toolbar show NO javascript, css, or html errors of any kind.
That's exactly what it's supposed to do.

Using Internet Explorer 7:
The javascript for modifying the DOM element's content still works when the links on the left are clicked.
But the Map itself, calculation of Shipping distance, and display of relevant content in the respective DOM element upon finding shipping distance does not work. The map doesn't display.

It seems the jQuery code is working fine but not the Google maps code.

The error i receive is this:

Line: 4 Char: 9 Error: Object doesn't support this property or method. Code: 0

I'm assuming it's referring to http://www.schwebdesign.com/zooktemp/js/gmaps.js
Line 4 of gmaps.js contains only this:
map.enableGoogleBar();


Removing that line does not effect the line of the error or solve the problem.

please check out the source at: http://www.schwebdesign.com/zooktemp/map5.php
linked JS script i created is at: http://www.schwebdesign.com/zooktemp/js/gmaps.js

Why does this work flawlessly in Firefox yet die in IE? The code is perfect as far as i can tell.

Does anyone have any insight in to this?

Please, any advice is greatly greatly appreciated.



Here are some things i've tried:

adding DEFER to the script:
<script type="text/javascript" DEFER src="js/gmaps.js"></script>
Yielded no change.

disabling the code on line 4 that it seems to be referring to (map.enableGoogleBar()
Yielded no change.
lefthandedpants is offline   Reply With Quote
Old 10-28-2008, 03:35 AM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
close this one mods....answered here: http://www.codingforums.com/showthread.php?t=151019
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:35 PM.


Advertisement
Log in to turn off these ads.