1

I am trying to set source of a dynamically inserted iframe with jquery, it works with one source but doesn't with google maps.

The google maps url work with iframe which is already there in page.

I've setup a my case on jsfiddle, I'm using three variables for testing, 'src1' works but 'src2' and 'src3' don't.

http://jsfiddle.net/RG8YK/1/

Please somebody help me out, I've been pulling my hair on this.

1 Answers1

0

apparently this is an issue with google maps. add the parameter output=embed to the src and it works: http://jsfiddle.net/RG8YK/2/

More info: Overcoming "Display forbidden by X-Frame-Options"

Community
  • 1
  • 1
Horen
  • 11,184
  • 11
  • 71
  • 113
  • Thanks, it worked after removing few other parameters from the iframe embed code provided by google maps, so it is not only output=embed, other params were also causing it not to work. –  Sep 21 '12 at 09:03