title: Stop added event listener functions after one returns false
body: <p>I have created a function to bind onblur events to elements. The function takes three string variables. The id of the element, the function you want to bind to the element, and any parameters it may need. Then within the function I use <a href="https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string">this suggestion</a> to utilize a string to call a function. </p>
  
  <p>Each function that is bound on blur is a validation function that will return true or false. My goal is to make it so that if multiple onblur events are added to the element, and any one of them returns false, the next ones will not be called. But as it's written right now each event that is added to the element fires even if there is a return false.</p>
  
  <p>Both my jquery and javascript version below add multiple onblur events, and fire them all whether they return true or false.</p>
  
  <pre><code>this.bindFormElements = function(elementId, ruleName, ruleParameters)
  {
      var onBlurEvent = function() 
      {
          if(dynFormSkin[ruleName](this, ruleParameters) == false)
          { 
              return false;   
          }
      };
  
      document.getElementById(elementId).addEventListener("blur", onBlurEvent, false);
  }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>this.bindFormElements = function(elementId, ruleName, ruleParameters)
  {
      $("#" + elementId).blur(function() 
      {
          if(dynFormSkin[ruleName](this, ruleParameters) == false)
          {
              return false;   
          }
      });
  }
  </code></pre>