title: Javascript compare and validate two text fields
body: <p>I have a problem i have the following javascript function:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  &lt;!--
  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;
  }
  //--&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>HERE IS THE JAVASCRIPT CALL: 
      <code>&lt;input name="passphrase" type="text" id="passphrase" onfocus="clearDefault(this)" onblur="MM_callJS('checkEnableSubmit')" value="Nopass" /&gt;</code></p>
  
  <p>I need to implement this script to add validation to my text fields, please i need help BADLY!!!!</p>