I have a problem i have the following javascript function:
<script type="text/javascript">
<!--
function BothFieldsIdenticalCaseSensitive() {
var two = document.bid_deal.passphrase_hidden.value;
var three = document.bid_deal.passphrase.value;
if(two == three) { return true; }
alert("Warning!! passcodes must match!!!");
return false;
}
//-->
</script>
I am using it to compare two text fields to make sure the two text fields match themselves. it is working for one set of text fileds but has refused to work if i add another set of text field and run another instance of the same function.
I have a call javascript function calling checkEnableSubmit when the action is executed but i dont know why it won't work with more than one set of text fields. I however noticed that both call javascript behaviors in the page call the same name of checkEnableSubmit. If i change the name one stops working.
HERE IS THE JAVASCRIPT CALL:
<input name="passphrase" type="text" id="passphrase" onfocus="clearDefault(this)" onblur="MM_callJS('checkEnableSubmit')" value="Nopass" />
I need to implement this script to add validation to my text fields, please i need help BADLY!!!!