Hello,



I am try to create a search form and require a user to select

1. Student and

2. either a "alldates" checkbox or "Start" and "End" dates.



This is what I did, but it never works for me.



What did I do wrong? How do I modify this code to make it worked.



Code:
<form method=POST action="Student.asp" name="frmStudent" onSubmit="return checkForm();">

<%       if not rsStudent.eof then %>

                        <select name="SelectStudent" size="1" title="Select a Student">

                                    <option value="1" SELECTED>Select a Student</option>

                                    <%       do until rsStudent.eof %>

                                    <option><%= rsStudent("Names") %></option>

                                    <%       rsStudent.MoveNext

                                                loop    %>

                        </select>

            <%       end if

%>

            All Dates:</span><input type="checkbox" Name="alldates" value="1"><br />

            <input name="Start" id="Start" class="" type="text" size="10" maxlength="12" onBlur="checkdate(this)" value=""><br />

            <a href="javascript:;" onclick="displayDatePicker('Start', this);"><img src="img/calendar.gif"></a>

            <input name="End" id="End" class="" type="text" size="10" maxlength="12" onBlur="checkdate(this)" value="">

            <a href="javascript:;" onclick="displayDatePicker('End', this);"><img src="img/calendar.gif"></a><br />

<input type="Submit" name="btnSubmit" value="Search">

</form>

 

<!--Search.asp -->

<%

If Request("rsTraveler") = "1" Then

            errorForm "Please select a Student!"

ElseIf (Request("alldates") = "") OR (Request("Start") = "" AND (Request("End")) = "" OR (Request("alldates") = "") Then

            errorForm "Please select a Date!"

End If

Else

---Show the results

%>