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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

verify password

Status
Not open for further replies.

nat35

Programmer
Nov 10, 2002
86
AU
hi there,
i am using DMX and sql2000.
I'm very new to JavaScript so please bear with me. I need to verify a password In my form I have username field,old password,new password,verify password.All data needs to be checked on_Submit.I've create a function
<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--
function frmChangePWD_onSubmit()
{
if (document.frmChangePWD.txtNew_PWD.Value != document.frmChangePWD.txtConfirm.Value) {
alert(&quot;The password didn't match&quot;);
return false;
}
return true;
}

//-->

I'm calling the code in the Form section:

<form action=&quot;&quot; method=&quot;post&quot; name=&quot;frmChangePWD&quot; target=&quot;_self&quot; id=&quot;frmChangePWD&quot; onSubmit=&quot;MM_validateForm('txtUserName','','R','txtOld_PWD','','R','txtNew_PWD','','R','txtConfirm','','R');return document.MM_returnValue && frmChangePWD_onSubmit() ;&quot;>

The regular validation function mm_validateform() works by itself, but Once I add another function it ignores my script completely .
What am I doing wrong
Thanks in advance
Nat

 
if u don't want to go through MM_ code take a look at:
for his form validation extentions.
All the best!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top