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?

Improve company productivity with a Business Account.Sign Up

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.