...

View Full Version : Error on google map javascript



robcoles
06-17-2010, 09:13 AM
http://www.cricketcoachingclinics.com.au/
I am having a problem with site in IE7 this is identified as a problem??
Can someone at least rule out this js error? This is js generated when adding google maps

Error Class is not defined

<CODE>var GoogleMap=Class.create(Widget,{widgetIdentifier:"com-apple-iweb-widget-GoogleMap",initialize:function($super,instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp)
{if(instanceID){$super(instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp);}},mapReq uestTemplate:'center=#{center}&zoomLevel=#{zoomLevel}&showZoom=#{showZoom}&mapType=#{mapType}&locatedAddress=#{locatedAddress}&locatedAddressPoint=#{locatedAddressPoint}&showInfo=#{showInfo}&language=#{language}&showGoogleBar=#{showGoogleBar}',iframeTemplate:'<iframe id="#{instanceID}-iframe" name="#{instanceID}-iframe" src="#{mapURL}?#{mapRequest}" width="100%" height="100%" scrolling="no" marginheight="0" marginwidth="0" frameborder="0"></iframe>',mapURL:'http://www.me.com/st/1/sharedassets/maps/iweb2/',onload:function()
{var mapRequestTemplate=new Template(this.mapRequestTemplate);var mapRequest=mapRequestTemplate.evaluate({center:this.escapedPreferenceForKey("center"),zoomLevel:this.escapedPreferenceForKey("zoomLevel"),showZoom:this.escapedPreferenceForKey("showZoom"),mapType:this.escapedPreferenceForKey("mapType"),locatedAddress:this.escapedPreferenceForKey("locatedAddress"),locatedAddressPoint:this.escapedPreferenceForKey("locatedAddressPoint"),showInfo:this.escapedPreferenceForKey("showInfo"),language:this.escapedPreferenceForKey("language"),showGoogleBar:this.escapedPreferenceForKey("showGoogleBar")});var iframeTemplate=new Template(this.iframeTemplate);var iframeText=iframeTemplate.evaluate({instanceID:this.instanceID,mapRequest:mapRequest,mapURL:this.map URL});this.div().innerHTML=iframeText;if(this.preferences&&this.preferences.postNotification)
this.preferences.postNotification("BLWidgetIsSafeToDrawNotification",1);},escapedPreferenceForKey:function(key)
{var value=this.preferenceForKey(key);if(value!==undefined)
value=encodeURIComponent(value);return value;}});</CODE>

Old Pedant
06-17-2010, 08:08 PM
Problem is not in the code you showed.

Problem is that, as the message says, the variable Class is not defined.

So of course Class.create( ) does nothing.

And, yes, of course it is a JS error. But it's because something before this point in the code is missing.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum