This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to execute javascript function on popup from opener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to execute javascript function on popup from opener" Watch "How to execute javascript function on popup from opener" New topic
Author

How to execute javascript function on popup from opener

Homer Hill
Greenhorn

Joined: May 25, 2005
Posts: 3
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.
Homer
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
http://radio.javaranch.com/pascarello/2005/01/18/1106063002000.html

BUT you are not going to be able to do this across domains.

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to execute javascript function on popup from opener