File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes error in passing values from child window to parent window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "error in passing values from child window to parent window" Watch "error in passing values from child window to parent window" New topic
Author

error in passing values from child window to parent window

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
I have two windows - Parent and Child. WHen I click on a button in the parent window, the child window opens up.

The child window has two radio buttons and a submit button. On click of the submit button, I want the value to be passed to the parent window and the child window shd close.

Depending upon the value from the child window, the parent window should be redirected to the new URL.

I get the error in child window as :

document.frmHolidayType.rdoHoliday.selected.value is null or not an object.

Can anybody plz help!


SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
is that field in the parent?

then you need to do

window.opener.formName.elementName.value = "asdf";

Eric
JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
No, this field is in the child window.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
oh, duh, should have looked at your code more closely.

document.frmHolidayType.rdoHoliday.selected.value

that is not how you get a radio button value

this is:


Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in passing values from child window to parent window