Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating elements from window.opener?

 
chsanthosh kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you doing something like this:



Eric
 
chsanthosh kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no tag file.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic