javascript - Allow a child iframe (cross site) access to window.top -


i trying display web site in iframe. iframe url points internally hosted web server in corporation, although have no control on whatsoever , 'cross site' has different subdomain site. further, code maintained 3rd party company , takes long time changes this... banks , like! creators of content have stated there no intention prevent displaying/running web site in iframe.

we using cisco finesse "bring together" various 3rd party , locally developed web applications. (background, finesse uses apache shindig host 'gadgets'). @ technical level, want have single url gadget displayed in finesse, uses iframe display 3rd party page.

the problem far, there piece of code on 3rd party page tries access "window.top.location" , of course security exception thrown. here code:

function somefunc() {     var toppage = window.top;     if (toppage.location.pathname.indexof("default") == -1) {        return toppage;     }     return toppage; } 

the page url of form, http://domain/default.aspx - standard aspx default page , can't figure out why check being performed in manner.

having debugged little find code used in several locations no apparent reason. ie. doesn't need top page , looks me attempt prevent "something", i'm not sure , neither current maintainers of site.

i have tried same code in small test site see behaviour. if host site "default" in pathname (not cross site) function behaves 'as expected' (again, i'm not sure expectation is) , function returns 'toppage' no problems within child iframe (remember not cross site).

i have looked lot around net , stackoverflow, , far close requires changes 3rd party site (which cannot), haven't found case same. @ point quite sure there nothing can do, here ask gurus second opinions.

basically want know if there can do, hack, allow iframe access window.top?


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -