Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

javascript pop up getElementById, innerHTML, etc

Posted on 2011-09-15
1
Medium Priority
?
412 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

705 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