aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Creating elements from window.opener? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Creating elements from window.opener?" Watch "Creating elements from window.opener?" New topic
Author

Creating elements from window.opener?

chsanthosh kumar
Ranch Hand

Joined: Jun 28, 2005
Posts: 56
Hi All,

I have a form which consist of file fields and text boxes (It's Basically Upload form).

Where clicking on upload button I'm able to open popup window,

here is the situation:-

with that popup window i'm getting the parent window values and I need to add some more elements (Add dynamically) and remove the existed elements on Parent window.

I checked with CreateElement and remove child but it's not able to solve the problem ...

Is there any way to solve this problem.

Please suggest.

Thank you
[ March 05, 2007: Message edited by: chsanthosh kumar ]

---------------------<br />SCJP(1.4)With 95%<br /> <br />Do it Right and Forget it!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Are you doing something like this:



Eric
chsanthosh kumar
Ranch Hand

Joined: Jun 28, 2005
Posts: 56
function addElement(ID, value) {
var file = window.opener.document.getElementsByTagName(file);
var old = window.opener.document.getElementById(ID);
if (old) file.removeChild(old);
input = document.createElement('input');
input.value = value;
input.type = 'text';
input.id = ID;
file.appendChild(input);
}

I'm Using this function add and remove Elements from window.opener but this is not working,
I'm getting a error called "file has no properties"

Please suggest me.

thank you
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
There is no tag file.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating elements from window.opener?
 
Similar Threads
Submitting from pop-up window
Parent form reload
Losing Form on Spawning Itself
How to maintain session time out in parent window and popup windows
open popup window in same window