You need to sign in to do that
Don't have an account?
Iframe in VisualForce page - Google not displaying
I'm trying to embed an iFrame in a VisualForce page for a Google Maps mashup. For some reason anything from google.com is not displaying. Any other domain seems ok. The code below is a simplified version. I'd be very grateful for any advice, thanks, John
<apex:page>
<!-- this works-->
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
src="http://www.bing.com">
</iframe><br />
<!-- this doesn't work-->
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
src="http://www.google.com">
</iframe><br />
</apex:page>
Try this example
http://www.techsahre.blogspot.com/2011/04/sfgmap-salesforce-google-map-jquery.html
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
All Answers
Google uses the X-Frame-Options: SAMEORIGIN header to block the site displaying in iframes. The X-FRAME-Options header is a security feature to prevent click-jacking attacks.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Thanks Chamil, I see. In that case, how does one embed a Google map - all the examples I have see have been with IFrames?
Try this example
http://www.techsahre.blogspot.com/2011/04/sfgmap-salesforce-google-map-jquery.html
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Thanks Chamil - that is great