Solved

top.document equivalient in Chrome

Posted on 2013-01-12
4
236 Views
Last Modified: 2013-01-17
top.document.getElementById(iFrameId)  .... works fine in IE but returns null in Chrome.

Any thoughts please ?
0
Comment
Question by:cehrnow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 250 total points
ID: 38771238
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
 
LVL 23

Assisted Solution

by:Roopesh Reddy
Roopesh Reddy earned 250 total points
ID: 38771349
Hi,


You can even try -

window.parent.document.getElementById()

Open in new window


Hope it helps u...
0
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38786167
Hi,

Is the issue solved?
0
 

Author Comment

by:cehrnow
ID: 38786225
top.document.getElementById(iFrameId)does work..the issue was something else.
window.parent also works.
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question