top.document equivalient in Chrome

top.document.getElementById(iFrameId)  .... works fine in IE but returns null in Chrome.

Any thoughts please ?
cehrnowAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Michel PlungjanConnect With a Mentor IT ExpertCommented:
Should work

Can you show the html with the iFrame? does it have an ID or just a name?

e.g.

var iFrameId = "myIframe";
top.document.getElementById(iFrameId);
.
.
<iframe id="myIframe"....
0
 
Roopesh ReddyConnect With a Mentor IT AnalystCommented:
Hi,


You can even try -

window.parent.document.getElementById()

Open in new window


Hope it helps u...
0
 
Roopesh ReddyIT AnalystCommented:
Hi,

Is the issue solved?
0
 
cehrnowAuthor Commented:
top.document.getElementById(iFrameId)does work..the issue was something else.
window.parent also works.
Thanks
0
All Courses

From novice to tech pro — start learning today.