Jimmy Burgess Jimmy Burgess - 1 year ago 95
HTML Question

Window.parent and Window.top returning null

When I call

from my iFrame both return null in Chrome and iPad safari, however they both work in Firefox.

A lot of similar posts say the solution is to put the iframe html file on a server, however mine is already on an Apache Tomcat instance and is accessed with

There is no variable in the JavaScript which overrides the keywords parent or top.

Getting this to work in chrome isn't a big deal, I'm more concerned with iPad safari.

Any possible tips or solutions are greatly appreciated.

Answer Source

Based on the comments, you are in two different domains, and I am betting you have control over them.

You can look into HTML5 post message so you can talk between the domains.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download