<script>
function todayDate(date, old)
{
var f = new Date(date);
var n = new Date(old);
if (f > n)
{
alert("good"
}
else
{
alert("bad";
}
only put the function definition in <head>, between script tags of course
for your form, do: <form ... onsubmit="return todayDate(document.form.AssignedDate.value, document.from.DueDate.value)">
if you are going to do an onsubmit, you should put "return false;" in the else branch of the function's if statement, after the alert ray
rheindl@bju.edu
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.