Connecting Tech Pros Worldwide Forums | Help | Site Map

Tell when popup has been closed?

harry
Guest
 
Posts: n/a
#1: Jul 23 '05
I have a button that pops up a calender popup window. One of the arguments
to the openCalendar() is the name of the element to insert the selected date
into i.e a readonly text box - this works fine!

What I want to do is to detect when a value is inserted in to this box from
the popup so I can make visible a "save" button - trouble is though the
onfocus() & onchanged events are not fired when it's value changes.

Is there anyway to get some sort of event fired when a popup closes so I can
test if the text box has changed? - or more likely am I overlooking
something really obvious?

many thanks

harry




Ivo
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Tell when popup has been closed?


"harry" <a@abc.com> wrote[color=blue]
> I have a button that pops up a calender popup window. One of the arguments
> to the openCalendar() is the name of the element to insert the selected[/color]
date[color=blue]
> into i.e a readonly text box - this works fine!
>
> What I want to do is to detect when a value is inserted in to this box[/color]
from[color=blue]
> the popup so I can make visible a "save" button - trouble is though the
> onfocus() & onchanged events are not fired when it's value changes.[/color]

If I understand correctly, the value is changed by a javascript function.
Perhaps you could make this function also show the "Save" button.
[color=blue]
> Is there anyway to get some sort of event fired when a popup closes so I[/color]
can[color=blue]
> test if the text box has changed? - or more likely am I overlooking
> something really obvious?[/color]

Perhaps some "onunload" event handling in the popup?

HTH
Ivo


Guest
 
Posts: n/a
#3: Jul 23 '05

re: Tell when popup has been closed?


"harry" <a@abc.com> wrote in message
news:kmOlc.1447$983.13357095@news-text.cableinet.net...[color=blue]
>I have a button that pops up a calender popup window. One of the arguments
> to the openCalendar() is the name of the element to insert the selected
> date
> into i.e a readonly text box - this works fine!
>
> What I want to do is to detect when a value is inserted in to this box
> from
> the popup so I can make visible a "save" button - trouble is though the
> onfocus() & onchanged events are not fired when it's value changes.
>
> Is there anyway to get some sort of event fired when a popup closes so I
> can
> test if the text box has changed? - or more likely am I overlooking
> something really obvious?
>
> many thanks
>
> harry[/color]

why not just write a timer that checks to see if the box changes, have it
trap the error so that it knows the popup has been closed and shut off the
timer.


Closed Thread


Similar JavaScript / Ajax / DHTML bytes