JRS: In article <11**********************@a14g2000cwb.googlegroups .com>
, dated Sun, 2 Jul 2006 09:35:24 remote, seen in
news:comp.lang.javascript, Sunil <ch***********@gmail.composted :
>All these are entered by the user and are to validated for holidays.
The holiday validation can only be done on server side.
I am planning to use AJAX for these date validations.
Of course, everything that really matters to the system owner must be
validated server-side.
However, if the application is such that most dates are in the near
future, it's feasible to send to the client a list of (or algorithm for)
near-future holidays, so that near-future holidays can be selected from
a list or validated client-side for faster response. Errors on non-
near-future dates will still be caught, on the server, where all dates
can be checked.
The server cannot check far-future holidays reliably, since national
holidays are subject to political whim.
On a company intranet, it could be quite interesting to discover that
the client-side validation has been by-passed; that means that someone
has been trying, probably in the company's time, to break the company's
system - which for most staff should be a disciplinary offence.
Alternatively, if someone breaks validation to enter a holiday date such
as (US) July 4th, let that be docked from his leave entitlement.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.