Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > onchange

Reply
Thread Tools

onchange

 
 
displayname
Guest
Posts: n/a
 
      10-13-2009
I want to calculate in javascript the number of days between two dates as
soon as either of the dates is changed. I use onchange="calculateDays();". It
works fine if you type in a new date. But, if you change the date by
selecting a date from a calendar icon next to the date field, it does not
think the field has changed and thus the javascript function is not invoked.
How should that be fixed? The same thing happens with onclick. Thank you.
 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      10-13-2009
displayname wrote:
> I want to calculate in javascript the number of days between two
> dates as soon as either of the dates is changed. I use
> onchange="calculateDays();". It works fine if you type in a new date.
> But, if you change the date by selecting a date from a calendar icon
> next to the date field, it does not think the field has changed and
> thus the javascript function is not invoked. How should that be
> fixed? The same thing happens with onclick. Thank you.


Client-side scripting problems should be posted at m.p.scripting.jscript
or comp.lang.javascript. There is no ASP involved with this question.

That said, you will need to modify the function of that calendar control
that updates your textbox to have it call your function. Given that
there are thousands of javascript calendar controls out on the web, that
is as detailed as I can get.


--
HTH,
Bob Barrows


 
Reply With Quote
 
 
 
 
displayname
Guest
Posts: n/a
 
      10-13-2009
Thank you.

"Bob Barrows" wrote:

> displayname wrote:
> > I want to calculate in javascript the number of days between two
> > dates as soon as either of the dates is changed. I use
> > onchange="calculateDays();". It works fine if you type in a new date.
> > But, if you change the date by selecting a date from a calendar icon
> > next to the date field, it does not think the field has changed and
> > thus the javascript function is not invoked. How should that be
> > fixed? The same thing happens with onclick. Thank you.

>
> Client-side scripting problems should be posted at m.p.scripting.jscript
> or comp.lang.javascript. There is no ASP involved with this question.
>
> That said, you will need to modify the function of that calendar control
> that updates your textbox to have it call your function. Given that
> there are thousands of javascript calendar controls out on the web, that
> is as detailed as I can get.
>
>
> --
> HTH,
> Bob Barrows
>
>
>

 
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
calling clientside js with onchange event Zeebra3 ASP .Net 5 07-14-2007 11:12 PM
.Net validators broken by client-side script (cloneNode does not copy onchange handler) =?Utf-8?B?TW9ua2V5Qm95?= ASP .Net 2 06-05-2004 11:56 PM
need help determining the return value of a generated js onChange event MDBloemker ASP .Net 2 05-12-2004 02:45 AM
Textbox onchange won't fire after fill-in from popup window? Kathy Burke ASP .Net 1 11-10-2003 08:46 PM
POSTING A FORM USING onchange Brendan Vogt ASP .Net 2 08-28-2003 02:09 PM



Advertisments