473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 20312

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bostonasian | last post by:
I am trying to append options to dropdown in parent window from option items in child window. In parent window, I have following code: <script language="javascript"> function...
1
by: Bill Borg | last post by:
Hello all, Simple chat app, where the site owner has a master window with all requests for chat, status of each room, etc., and child windows for each separate chat in which the owner is...
18
by: Chris Ianson | last post by:
Hi geniuses (or is that genii, or genies) The challenge is as above really. I have a page with an iframe in it, and need to call a JS function in the *parent* page, *from* inside the iframe. ...
2
by: sanscrimson | last post by:
Hi! I just want to ask if it possible to call functions in parent window if the child window is created. Below is sample:...
6
by: pronerd | last post by:
Hi, I am trying to dynamically set an event handler across frames. I have no problems setting properties across frames doing something like parent.ToolMenuFrame.location.href =...
1
by: ace danger | last post by:
I have some javascript that works in Firefox 2 but not in IE 7. In the parent page, a user clicks a link and a new window is opened so that they can maintain some values. When the user is...
1
by: soms2m | last post by:
HELLO ALL, I want to fill the parent window height with respect to the sub window height which is loading using ajax (mootools). For example if the parent window height is normal and the loading...
29
Frinavale
by: Frinavale | last post by:
I have 2 FireFox (version 2) browser windows opened. One is the child of the other. When the user is finished with the child window, a method in the parent window is called to refresh a...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.