call a parent javascript function from the child window

Discussion in 'Javascript' started by Filiz Duman, Jan 21, 2004.

  1. Filiz Duman

    Filiz Duman Guest

    Is it possible to call a javascript function based in the parent window from
    the child window ?
    I do open a pop up window from the parent window with:

    newwindow = window.open (...)

    and assign a value from the child window to the parent window text field:

    opener.document.forms["xxx"].elements["yyy"].value = valuename;

    At this stage I would like to call another javascript function coded in the
    parent window <script> part. I do not want to put the code in the child
    window since it is more a validation check on the parent window, so every
    time the value is passed to the parent window text field the validation
    should fire. I played around with the events but all textfield events
    (onFocus, on Blur) did not help me, since the textfield is disabled.
    Any ideas ?
    Filiz Duman, Jan 21, 2004
    #1
    1. Advertising

  2. Filiz Duman

    Filiz Duman Guest

    Re: call a parent javascript function from the child window - GOT IT !

    "Filiz Duman" <> wrote in message
    news:bum3l1$an3$...
    > Is it possible to call a javascript function based in the parent window

    from
    > the child window ?
    > I do open a pop up window from the parent window with:
    >
    > newwindow = window.open (...)
    >
    > and assign a value from the child window to the parent window text field:
    >
    > opener.document.forms["xxx"].elements["yyy"].value = valuename;
    >
    > At this stage I would like to call another javascript function coded in

    the
    > parent window <script> part. I do not want to put the code in the child
    > window since it is more a validation check on the parent window, so every
    > time the value is passed to the parent window text field the validation
    > should fire. I played around with the events but all textfield events
    > (onFocus, on Blur) did not help me, since the textfield is disabled.
    > Any ideas ?


    Thanks found it.
    window.opener.functionname();
    Filiz Duman, Jan 21, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bhishm
    Replies:
    2
    Views:
    797
    bruce barker
    Sep 3, 2007
  2. Noel Dolan
    Replies:
    0
    Views:
    227
    Noel Dolan
    Jul 18, 2004
  3. Spammay Blockay
    Replies:
    1
    Views:
    428
    Dietmar Meier
    Feb 4, 2005
  4. ace danger
    Replies:
    1
    Views:
    123
  5. Bitswapper
    Replies:
    5
    Views:
    132
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page