469,352 Members | 2,154 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

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 ?



Jul 20 '05 #1
1 19661

"Filiz Duman" <no**@aol.com> wrote in message
news:bu**********@visp.bt.co.uk...
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();
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bill Borg | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.