how do i call the check() function inside the <% code %>
<SCRIPT LANGUAGE=VBSCRIPT>
<!--
function check()
Dim TheForm
Set TheForm=Document.form
IF TheForm.password1.value<>TheForm.password2.value THEN
TheForm.error.value="Please Check your Passwords , they do not match"
TheForm.action="newUser.asp"
THeForm.submit()
ELSE IF TheForm.password1.value="" THEN
TheForm.error.value="Please fill in the password fields, they are required"
TheForm.action="newUser.asp"
TheForm.submit()
ELSE IF TheForm.login.value="" THEN
TheForm.error.value="Please fill in the login field, it is required"
TheForm.action="newUser.asp"
THeForm.submit()
END IF
END IF
END IF
end function
-->
</SCRIPT>
<%
Dim rs
Dim strConn
Set rs = Server.CreateObject("ADODB.Recordset"

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\
rs.Open "Users", strConn
Do While Not rs.EOF
IF rs.Fields("userName"

=Request.form("login"

THEN
Response.redirect("newUser.asp"

END IF
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
%>