Win a copy of Rust Web Development this week in the Other Languages forum!

Homer Hill

+ Follow
since May 25, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Homer Hill

Thanks Eric.

I would need to use the second method you described as I can't touch the code in the popup window.

Just to clarify, are you saying that I should do something like this:

popup =;
loaded = false;
while (loaded == false) {
try {
if (popup) { //will this line return true ONLY when the popup has loaded?
loaded = true;
<execute javascript on popup>
} catch (e) {


Is it possible to tell from a parent window if a popup window has fully loaded?

I'm running some javascript on a popup window from a parent window and it can only be done once the popup has fully loaded. Is this possible? I can set a timer, but that does not guarantee that the popup fill fully load before the timer expires, unless I set the timer to a large value, but that is awkward for the user.

How is a situation like this typically handled?

Hi there,

I'm a javascript newbie so be gentle.

I basically need to open a popup window and then execute a javascript function on the popup. The popup can not have a call to the javascript function -- the function must be executed ON the popup FROM the opener.

Here is an example of what I want to do.

On the opener window, if a user clicks a button, a window pops up. This popup could be a registration form for a forum. Once the popup has fully loaded, I need to execute a javascript function that will fill in some fields of the form (such as the e-mail address of the user if it is already known).

This is fairly simple if I put the function call in the BODY tag of the popup, but I'd like to avoid doing this.

Thanks for any help! Please let me know if any clarification is required.