Can an AGOL home page be embedded in an iframe

2756
2
Jump to solution
09-03-2015 09:52 AM
ZorbaConlen
Occasional Contributor

Hi,

I would like to embed my organization home page into a website. I assumed this would be a simple matter of using an html snippet. Something like this:

<iframe width="800" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://cobgis.maps.arcgis.com/home/index.html"></iframe>

But when I attempt to view that page in a browser, it immediately redirects to my AGOL home page. Not embedded. Perhaps there is some javascript in the page that is causing this?

Anyhow, if anyone knows why this is happening and if there is a work-around, I'd love to hear it.

Thanks

0 Kudos
1 Solution

Accepted Solutions
ChrisSmith7
Frequent Contributor

It looks like it's working ok in fiddler:

Edit fiddle - JSFiddle

Sometimes, there's JavaScript that will cause a breakout. There may be a workaround using "onbeforeunload":

Edit fiddle - JSFiddle

...or, if you can use HTML5, with sandboxing:

Play safely in sandboxed IFrames - HTML5 Rocks

View solution in original post

0 Kudos
2 Replies
ChrisSmith7
Frequent Contributor

It looks like it's working ok in fiddler:

Edit fiddle - JSFiddle

Sometimes, there's JavaScript that will cause a breakout. There may be a workaround using "onbeforeunload":

Edit fiddle - JSFiddle

...or, if you can use HTML5, with sandboxing:

Play safely in sandboxed IFrames - HTML5 Rocks

0 Kudos
ZorbaConlen
Occasional Contributor

Thanks Chris. Just getting back to this after other priorities came up. I do see that it works fine in the fiddle. I also tried it on a computer outside of my work domain and it works there. I guess that points to some kind of security issue in our environment here that is causing the issue. I will continue investigating.

0 Kudos