× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi folks,

I am currently running WDSc. standard
Version: 5.1.2.4
Build id: 20040609_0820

I am using a java script that I picked up on the web for form validation.
It's called "FormCheck.js". Within this script there is a function
"isIntegerInRange" which takes three arguments (a test value, a low value,
and a high value). This function is called from a date checking routine to
determine if the day entered is between 1 and the last day of the month and
if the month entered is between 1 and 12.

It being August, naturally one of my entries was for this month. I found
something really strange!!! There is a line in the script where the test
value is changed from character to integer using parseInt(). I placed some
alerts around the line like so: 

    alert ("s is " + s);
    var num = parseInt (s);
    alert ("num is now " + num);

Turns out, the only values that don't parse properly (in the range 1 - 31)
are '08' and '09' which result in num being zero. '01' thru '07' result in a
1 and 7 respectively. Obviously, dates containing these numbers do not
validate when tested against the range limits.

I am viewing these results in the jsp editor (preview tab). Is this a
problem with the underlying javascript support in WDSc. ?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.