Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: verify date using jscript


Message #1 by "JUDY FANCHER" <judith.a.fancher@l...> on Tue, 21 Nov 2000 21:04:47 -0000
MIME-version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

The code would be very helpful I have been given a deadline of today for this issue.
THANKS!!! TONS!!!

Judy Fancher
Computer Sciences Corporation
xxx-xxx-xxxx
judith.a.fancher@l...



-----Original Message-----
From: laxmikant [mailto:laxmikants@h...]
Sent: Wednesday, November 22, 2000 2:24 AM
To: javascript
Subject: [javascript] Re: verify date using jscript


Hi,

There is no function call isdate in javascript like vbscript. What you need
to do is you need to validate the contains of that input box and then
display error messages.

if you need further help I can send you the reuired code.

Laxmikant
----- Original Message -----
From: "JUDY FANCHER" <judith.a.fancher@l...>
To: "javascript" <javascript@p...>
Sent: Wednesday, November 22, 2000 5:04 PM
Subject: [javascript] verify date using jscript


> Hi All,
> I have an asp page where the user enters the date in a textbox. I want to
> verify that the date in not empty(that part of my code works) and that the
> info entered is an actual date ( as in isdate function??)
> Can anyone out there help me with this? Code follows. Currently I have the
> second portion commented out.
> Thanks in advance.
>
> <!--
>
>  function checkValues()
>  {
>  if (document.forms[0].elements["RptDate"].value=="")
>  {
>  alert ("The Date Field cannot contain spaces.");
>  document.forms[0].elements["RptDate"].focus();
>  return false
>  }
>  /* else if not isdate(document.forms[0].elements["RptDate"])
>  {
>  alert ("The Date Field must contain Date in mm/dd/yy format.");
>  document.forms[0].elements["RptDate"].focus();
>  return false
>  }
>  */
>  }
>  return true;
>  }
>  -->
>


  Return to Index