0

I have a CSS banner/menu. The links (buttons) should target to an iframe on the same page. It's not working. Nothing appears in the iframe but the SRC page. Clicking on the link return a blank within the iframe.

Have a look: http://ihrc.site88.net/iframe.html (click on link called target iframe main also have a look at the source)

  • 1
    Hi Worldly, welcome to StackOverflow! Please have a look at the [editing help](http://stackoverflow.com/editing-help) and improve your question according to those guidelines as it is currently very unclear what you're intending to achieve here and how you're going about it. – Ortund Nov 03 '16 at 15:40

1 Answers1

0

If I understand you correctly when you click on the button you want the iframe src to be changed. But when you click the target iframe main button the iframe becomes blank but if you check the console it gives you "Refused to display 'https://www.google.co.in/?gfe_rd=cr&ei=H1wbWOmhAavT8geWn6eYDg' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'."

console error

Which, if i undestand correctly, is caused as the target url is on a different domain i.e google.com. I would suggest upload another page on the same domain & check.

But if you still want to display a webpage from a different domain then How to set 'X-Frame-Options' on iframe? may help.

Incase it is something else then a little more elaboration is required.

Community
  • 1
  • 1