Here is the issue that I am having. I have two text feilds where users need to enter a "From Date:" and a "To Date:" they then hit a update button and my code will pull back the data for the date ranges they have selected.
If the user enters the same date in both from and to fields they are expecting to see just one row returned for that day, BUT what is really happening is it is returning all the data.
Does anyone have any suggestions or ideas on how I can just have one row return if the users enter the same date?
CODE
<script language="javascript">
function submit() {
var fundshareid = document.getElementById('fundshareid').value;
var fd = document.getElementById('fd').value;
var td = document.getElementById('td').value;
var tp = "<%=request.getParameter("tp")%>";
if (tp == null || tp == "null") {tp = "fl";}
return document.location = "<%=request.getAttribute("baseURI")%>" + "?fd=" + fd + "&fundshareid=" + fundshareid + "&link=products&td=" + td + "&tp=" + tp + "&ut=" + "<%=request.getParameter("ut")%>";
}
function validate(){
if (isDate(document.forms[1].fd.value)==false){
document.forms[1].fd.focus();
return false;
}
if (isDate(document.forms[1].td.value)==false){
document.forms[1].td.focus();
return false;
} else {
fd = new Date(document.forms[1].fd.value);
td = new Date(document.forms[1].td.value);
if (fd > td){
alert("We're sorry, but we are unable to display the requested data. Please select a \"To Date\" that is greater (more recent) than the \"From Date.\"");
return false;
}
}
return true;
}