java script is not working
- by Piyush
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???