java script is not working

Posted by Piyush on Stack Overflow See other posts from Stack Overflow or by Piyush
Published on 2010-05-18T19:01:27Z Indexed on 2010/05/18 19:10 UTC
Read the original article Hit count: 380

Filed under:
|

i am comparing password and confirm password through java script.my code-

function validate_form(thisform)
{  
with (thisform)
  {  
    if (validate_required(password,"<b>Error: </b>Password must be filled out!")==false)  
  {password.focus();return false;}

  else if (validate_required(cnfpassword,"<b>Error: </b>Confirm Password must be filled out!")==false)
  {cnfpassword.focus();return false;}

  else if (document.getElementById('password').value != document.getElementById('cnfpassword').value)
  {password.focus();Sexy.error("<b>Error: </b>Passwords entered are not same!"); 
  password.value="";cnfpassword.value="";return false;}
  }

validate_required() function is working fine, it is showing alert msg but password compare is not working. But the same code is working fine in some other page.I have written some php code to avoid page caching-

<?php
session_start();
session_cache_limiter('nocache');
header('Pragma: no-cache');
?>

what's the problem???

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about php