CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Help - onchange event when using DatePicker

Print topic Send  topic

Author Message
Frank Rocco
Posted: 10/20/2003, 12:34 PM

Hello,

I have a Date field that has an onchange event.
This works fine if I type a date.
However, when I pick a date using the DatePicker, the onchange event will
not fire.

How can I get this to work?

Thanks

Frank

Karen Tan
Posted: 10/20/2003, 10:24 PM

I have the same problem too and also can't figure out why.

-Karen

Frank Rocco wrote:
> Hello,
>
> I have a Date field that has an onchange event.
> This works fine if I type a date.
> However, when I pick a date using the DatePicker, the onchange event will
> not fire.
>
> How can I get this to work?
>
> Thanks
>
> Frank
>
>
DonB
Posted: 10/21/2003, 6:12 AM

It does not fire until the control loses focus. From documentation on the
onchange event:

"This event is fired when the contents are committed and not while the
value is changing. For example, on a text box, this event is not fired while
the user is typing, but rather when the user commits the change by leaving
the text box that has focus. In addition, this event is executed before the
code specified by onblur when the control is also losing the focus."


--
DonB

http://www.gotodon.com/ccbth


"Karen Tan" <architech@awes2001.com> wrote in message
news:bn2fu8$jma$1@news.codecharge.com...
> I have the same problem too and also can't figure out why.
>
> -Karen
>
> Frank Rocco wrote:
> > Hello,
> >
> > I have a Date field that has an onchange event.
> > This works fine if I type a date.
> > However, when I pick a date using the DatePicker, the onchange event
will
> > not fire.
> >
> > How can I get this to work?
> >
> > Thanks
> >
> > Frank
> >
> >
>

Frank Rocco
Posted: 10/21/2003, 8:00 AM

Are you saying to use the onblur event in the DatePicker control?

Regards,

Frank

"DonB" <~ccbth~@gotodon.com> wrote in message
news:bn3bcl$8je$1@news.codecharge.com...
> It does not fire until the control loses focus. From documentation on the
> onchange event:
>
> "This event is fired when the contents are committed and not while the
> value is changing. For example, on a text box, this event is not fired
while
> the user is typing, but rather when the user commits the change by leaving
> the text box that has focus. In addition, this event is executed before
the
> code specified by onblur when the control is also losing the focus."
>
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "Karen Tan" <architech@awes2001.com> wrote in message
>news:bn2fu8$jma$1@news.codecharge.com...
> > I have the same problem too and also can't figure out why.
> >
> > -Karen
> >
> > Frank Rocco wrote:
> > > Hello,
> > >
> > > I have a Date field that has an onchange event.
> > > This works fine if I type a date.
> > > However, when I pick a date using the DatePicker, the onchange event
> will
> > > not fire.
> > >
> > > How can I get this to work?
> > >
> > > Thanks
> > >
> > > Frank
> > >
> > >
> >
>
>

Karen Tan
Posted: 10/21/2003, 8:12 AM

Hi Don,

I'm not quite sure what you mean but I've tested by doing a manual entry
and then tab out of the control and it works but using the date picker
and the tabbing out doesn't work. It doesn't make sense.

DonB wrote:
> It does not fire until the control loses focus. From documentation on the
> onchange event:
>
> "This event is fired when the contents are committed and not while the
> value is changing. For example, on a text box, this event is not fired while
> the user is typing, but rather when the user commits the change by leaving
> the text box that has focus. In addition, this event is executed before the
> code specified by onblur when the control is also losing the focus."
>
>
DonB
Posted: 10/21/2003, 8:56 AM

I was just quoting from the documentation I have for the onchange event. I
can't count the number of times I've said "it doesn't make sense", but
resigned myself to the fact that it *is* the way it works.

If I was doing a VB app, then the onchange would not care if the keyboard or
my code changed the control's value. Evidently this is not the case with
web apps, based on the way it's documented and your test case.

Perhaps you can figure out a way to call or execute the code you have in the
event handler, in a way other than relying on the event firing. maybe the
idea of a popup datepicker is all wrong in this scenario and you'd be better
off with Maybe the trick will be some other event that fires when the
datepicker closes and the page that was the datepicker's target regains
focus (i.e., look for some page-level event to fire and try to use that one
instead).

When I first did VB programs, I built a form with message boxes in all the
events so I could play around and see what event happened, when it happened,
and so on. That may be your best option in this situation, too.

--
DonB

http://www.gotodon.com/ccbth


"Karen Tan" <architech@awes2001.com> wrote in message
news:bn3ici$lnk$1@news.codecharge.com...
> Hi Don,
>
> I'm not quite sure what you mean but I've tested by doing a manual entry
> and then tab out of the control and it works but using the date picker
> and the tabbing out doesn't work. It doesn't make sense.
>
> DonB wrote:
> > It does not fire until the control loses focus. From documentation on
the
> > onchange event:
> >
> > "This event is fired when the contents are committed and not while the
> > value is changing. For example, on a text box, this event is not fired
while
> > the user is typing, but rather when the user commits the change by
leaving
> > the text box that has focus. In addition, this event is executed before
the
> > code specified by onblur when the control is also losing the focus."
> >
> >
>

Karen Tan
Posted: 10/21/2003, 9:56 PM

Thanks for your ideas, DonB. At least I know, it's not something I'm
doing wrong while trying to make some sense out of it all!

DonB wrote:
> I was just quoting from the documentation I have for the onchange event. I
> can't count the number of times I've said "it doesn't make sense", but
> resigned myself to the fact that it *is* the way it works.
>
> If I was doing a VB app, then the onchange would not care if the keyboard or
> my code changed the control's value. Evidently this is not the case with
> web apps, based on the way it's documented and your test case.
>
> Perhaps you can figure out a way to call or execute the code you have in the
> event handler, in a way other than relying on the event firing. maybe the
> idea of a popup datepicker is all wrong in this scenario and you'd be better
> off with Maybe the trick will be some other event that fires when the
> datepicker closes and the page that was the datepicker's target regains
> focus (i.e., look for some page-level event to fire and try to use that one
> instead).
>
> When I first did VB programs, I built a form with message boxes in all the
> events so I could play around and see what event happened, when it happened,
> and so on. That may be your best option in this situation, too.
>

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.