OnClick not working...Please help.

I have a simple function that makes sure info was entered and that the password matches the re-entered password. When I select Submit and "don't fill out any info it processes to the <form action="..."> anyway. What am I doing wrong?????
<Html>
<Head>
<Title>Unisys Integrated Tax System</title>
<script language="JavaScript">
function CheckFields()
<!--
     if(document.frm.Password.value == '')
          alert('Please enter a value for Password');
          document.frm.Password.focus();
          return(false);
     if(document.frm.RePassword.value == '')
          alert('Please enter a value for Re- Password');
          document.frm.RePassword.focus();
          return(false);
     if(document.frm.UserName.value == '')
          alert('Please enter a value for UserName');
          document.frm.UserName.focus();
          return(false);
     if(document.frm.Password.value != document.frm.RePassword.value)
          alert('The values for the password and RePassword are not the same. Please fix');
          document.frm.Password.focus();
          return(false);
     return true;
-->
</script>          
</head>
<Body>
<Form Name="frm" Action="itsLogin.jsp " Method=Post>
<%
// first time make it true, then make it false to continue using the same session.
session = request.getSession(false);
// Set up variables
String UserPswd = (String)session.getAttribute("FIRST_NAME");
String UserID = (String)session.getAttribute("ID");
%>
//UserPswd = <%=session.getAttribute("FIRST_NAME")%> <br>
//UserID = <%=session.getAttribute("LAST_NAME") %><BR>
// Just printing to making sure they work<br>
UserPswd = <%=UserPswd%> <br>
UserID = <%=UserID%> <br>
<br>
<font color = "red"><p>User Name: <INPUT type=text Name=UserName></font>
<font color = "red"><p>Password:   <INPUT type=text Name=Password></font>
<font color = "red"><p>Re-Password:   <INPUT type=text Name=RePassword></font>
<p> <INPUT type=Submit value="Submit" onClick="return Checkfields();">
 <A HREF="/ITS/hint.jsp"><h4> Forget Password? </h4></A>
<br>
</form>
</body>
</html>

case is not matching???
function CheckFields()
<INPUT type=Submit value="Submit" onClick="return Checkfields();">
CheckFields ======= Checkfields()
Be cool gentleman!!!!!!!!

Similar Messages

Maybe you are looking for

  • Lumia Black for lumia 620

    Dear Sir,Mam This is to inform you that i am very fond of nokia since 12 years and have believe in your brand.I would like to say that kindly provide Lumia black update for my 620 handset as soon as possible because you already provided for other mod

  • C440 Problems with HDMI

    I am connecting my C440 All in One running Windows 8.1to the TV. From the Devices charm I chose Project and then Duplicate. Everytime the PC screen blanks out. Doesn't matter if I chose to select just for the PC as soon as i connect he HDMI cable the

  • TS1424 How do I complain about a charge in my account?

    I got a repeated charge for an app, and I am trying to contact someone to report this complaint, but the system keeps me going in circles. How do I communicate directly with the billing department?

  • Help on LSMW

    Dear all, I have done direct input method for GL upload LSMW. I am able to see converted data as well in right fields. but when trying to run batch input , it is giving me following error . File FIN_GL_ABB_FIN_GL_1_GLCOA.lsmw.conv is being checked Se

  • Adobe photoshop didnt work and i paid over 79.00

    i want my money back this product didnt work!!!!!