I have a button which calls a JS function 
I'm checking to see if a date is prior to another.. if not then the
function should alert the user and return out of the function. If it's
prior to the end date then the function should change the action of
the form and then submit the form.

I have this..
function subForm()
{
        if (document.siteReferrals.StartDate.value >
document.siteReferrals.EndDate.value)
        {
                alert("Your Start Date must be before your End Date");
                return false;
        }
        else
        {
                document.siteReferrals.action='Report-SiteReferrals.cfm';
                document.siteReferrals.submit();
        }               
}


No matter what it always submits the page.
Even if it alerts me that the start date is greater then the end date.


-- 
Auxilium meum a Domino

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188067
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to