• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error in passing values from child window to parent window

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is that field in the parent?

then you need to do

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

Eric
 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, this field is in the child window.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic