call a parent javascript function from the child window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Filiz Duman

    call a parent javascript function from the child window

    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

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


    "Filiz Duman" <none@aol.com > wrote in message
    news:bum3l1$an3 $1@visp.bt.co.u k...[color=blue]
    > Is it possible to call a javascript function based in the parent window[/color]
    from[color=blue]
    > 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[/color]
    the[color=blue]
    > 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 ?[/color]

    Thanks found it.
    window.opener.f unctionname();


    Comment

    Working...