You need to sign in to do that
Don't have an account?
RagingForce
hiding header makes javascript google maps functionality not work
Hi i have sites page that renders a google map but if i disable the header it does not work?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi i have sites page that renders a google map but if i disable the header it does not work?
Hi Looking further into this it stops working when i try to draw some markers on the map, this is done via apex web service class
here in the javascript i call the data to draw the markers:
function AddMarkers() { var locList = sforce.apex.execute("CLocationGoogleMap", "GetLocationsInCity", {cityName:"{!Location__c.City__c}"}); //alert(locList);
it seems to stop here in the sites page if hide the header, but if i show the header it works?
You are likely referencing a JavaScript library that is no longer being called since you are not loading the header. Look for that library and call it explicitly from your VisualForce page using the apex:includeScript tag.
Mike
i am confused i am only using the google maps api v3 and apex javascript ?
When you set the 'showHeader' attribute to false, you no longer load the common JavaScript libraries that are normally loaded when the header is present. Any scripts that are exposed when the header is loaded would have to be called directly from your VisualForce page.
For example, when I look at a page in one of my dev orgs using Firebug, I can see that the following scripts are loaded at runtime:
If I look at a page that is rendered with 'showHeader=false', these libraries are not present, and only the JS libraries that I reference explicitly are loaded at runtime.
Interestingly this is where the error iswhen ia m trying to load my apex class in javascript?
Interestingly this is where the error iswhen ia m trying to load my apex class in javascript?
Have you granted permissions on the page / controller / webservice class for the sites ?