Solved

javascript pop up getElementById, innerHTML, etc

Posted on 2011-09-15
1
406 Views
Last Modified: 2012-05-12
     popup = window.open( "PTFACRPT/output/PTFinalEvalReportSOURCE.html", "", "status = 1, height = 400, width = 500, top = 200, left = 300, resizable = 1" )      
      alert(popup.getElementById("test").innerHTML)

This throws an err on the alert.
Can this work?
If so, how?
0
Comment
Question by:KeithMcElroy
[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
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 36546577
popup = window.open( "PTFACRPT/output/PTFinalEvalReportSOURCE.html", "", "status = 1, height = 400, width = 500, top = 200, left = 300, resizable = 1" )      
setTimeout( function() { alert(popup.getElementById("test").innerHTML) }, 5000); // wait 5 second to be sure DOM of the popup is ready


the better way is to call a parent function from the popup with something like : window.onload = function() {   opener.parentFunction();  }
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

623 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