Solved

javascript pop up getElementById, innerHTML, etc

Posted on 2011-09-15
1
399 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

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

Title # Comments Views Activity
15 puzzle in Javascript/html 2 92
Validating number not work with decimal 4 46
Slow Down an Animation 3 29
Error just appeared 3 23
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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

752 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