Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   onchange (http://www.velocityreviews.com/forums/t804955-onchange.html)

displayname 10-13-2009 01:04 PM

onchange
 
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.

Bob Barrows 10-13-2009 01:18 PM

Re: onchange
 
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



displayname 10-13-2009 06:42 PM

Re: onchange
 
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
>
>
>



All times are GMT. The time now is 11:57 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.