Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Script

Status
Not open for further replies.

FoxStudent

Technical User
Feb 24, 2000
85
GB
I am trying to get this java script function to work when a button is clicked. I do not get the code highlighted as if there is a syntax error. However, when the page is previewed I get the message 'Done, but with errors on page' on the status bar. Has anybody any suggestions thanks.

<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<script language=&quot;javascript&quot;>
<function CheckPassword(){
varPassword = EmailSingup.frmCreateEmail.txtPassword.value;
varPassConfirm = EmailSignup.frmCreateEmail.txtConfirmPassword.value;
if(varPassword == varPassConfirm)
{ return true;
}
else
{ alert(&quot;Your two passwords do not match&quot;);
return false;
}
}
>
</script>

This code appears later on in the body of the page.
<input type=&quot;button&quot; name=&quot;cmdCheck&quot; value=&quot;Check Availability&quot; onClick = &quot;CheckPassword()&quot;>

 
This may nopt be it, but


varPassword = EmailSingup.frmCreateEmail.txtPassword.value;
varPassConfirm = EmailSignup.frmCreateEmail.txtConfirmPassword.value;



varPassword = EmailSingup.frmCreateEmail.txtPassword.value;
varPassConfirm = EmailSingup.frmCreateEmail.txtConfirmPassword.value;

The names in BOLD are spelled differently...try changing that... I have not failed; I merely found 100,000 different ways of not succeding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top