473,320 Members | 1,949 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,320 software developers and data experts.

Firing an event in a parent window ?

I have a popup window that displays a calendar; it's opened by a button that
relates to a textbox used to enter a date. When the popup is opened, the ID
and the value of the date textbox is passed as an argument. I can update
the date control with the newly selected date, but how then can I trigger a
changed event on the date textbox control from the child calendar window ?
--
Adrian
Aug 20 '06 #1
2 1520
Adrian Parker wrote:
I have a popup window that displays a calendar; it's opened by a button that
relates to a textbox used to enter a date. When the popup is opened, the ID
and the value of the date textbox is passed as an argument. I can update
the date control with the newly selected date, but how then can I trigger a
changed event on the date textbox control from the child calendar window ?
If you are changing the text input's value, you must have a reference
to it. If you want to call its onchange handler, then do it. You are
probablly doing something like:

var inputRef = opener.document.getElementById( someID );
inputRef.value = someNewValue;

// Now call onchange
if ('function' == typeof inputRef.onchange) inputRef.onchange();
--
Fred

Aug 20 '06 #2
Thanks. Had to use inputRef.fireEvent('onchange') to get it to work in the
end though.

<oz****@iinet.net.auwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
| Adrian Parker wrote:
| I have a popup window that displays a calendar; it's opened by a button
that
| relates to a textbox used to enter a date. When the popup is opened,
the ID
| and the value of the date textbox is passed as an argument. I can
update
| the date control with the newly selected date, but how then can I
trigger a
| changed event on the date textbox control from the child calendar window
?
|
| If you are changing the text input's value, you must have a reference
| to it. If you want to call its onchange handler, then do it. You are
| probablly doing something like:
|
| var inputRef = opener.document.getElementById( someID );
| inputRef.value = someNewValue;
|
| // Now call onchange
| if ('function' == typeof inputRef.onchange) inputRef.onchange();
|
|
| --
| Fred
|
Aug 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jbmeeh | last post by:
I am a newbie to C++. I am writing a C++ class to expose the funtionality of CRectTracker to a C# application. I am passing a parent window object to the C++ class and I want to expose the...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
2
by: Ben Fidge | last post by:
Hi I want to provide a pop-up window a bit like the asp.net calendar, but when the user selects a value, instead of poking a value straight into a textbox on the parent page, I want to pass back...
1
by: Andy | last post by:
Hello, I have a datagrid within another datagrid. The innder datagrid contains a dropdownlist which fires an event as index change (OnSelectedIndexChanged). I can get the ItemIndex of the...
9
by: mike | last post by:
I have this script executing <script> function mike_test(event) { x = window.event.clientX; alert(x); } </script> <iframe src="blank.html" id="my_iframe1"> </iframe>
0
by: Mike | last post by:
Hi. I can't figure out why a button's click event is not firing in a templated control I've created (first time I've tried creating one). Please can someone help? On a point of lesser importance,...
10
by: John Kotuby | last post by:
Hello all... I am working on an ASP.NET 2.0 application with VS2005 and VB. I have chosen to use popup windows in some cases because it makes the user experience better (according to all the users...
0
by: CMELLO | last post by:
I have am dynamically loading a web user control based on the click of a tab strip I load the default control for the first tab in the page load event after checking page is not postback. After...
0
by: =?Utf-8?B?Y2luZHk=?= | last post by:
I have am dynamically loading a web user control based on the click of a tab strip I load the default control for the first tab in the page load event after checking page is not postback. After...
3
by: ndeeley | last post by:
Hi, I've got a link nested inside a form which, when clicked, should open a new window. Whilst it's doing this it also opens the page in the existing parent window as well. I didn't write the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.