Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > call a parent javascript function from the child window

Reply
Thread Tools

call a parent javascript function from the child window

 
 
Filiz Duman
Guest
Posts: n/a
 
      01-21-2004
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 ?







 
Reply With Quote
 
 
 
 
Filiz Duman
Guest
Posts: n/a
 
      01-21-2004

"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();


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
Calling function in a child window from main parent window Bhishm ASP .Net 2 09-03-2007 07:22 PM
Call javascript in parent from child (pop up) window ace danger Javascript 1 01-12-2007 06:29 PM
Results from child window submit into parent window, then child closes -- How To? Spammay Blockay Javascript 1 02-04-2005 12:47 PM
Pass from parent to child, then update parent with child value... Noel Dolan Javascript 0 07-18-2004 05:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57