jQuery "Too much recursion" error only on one specific server
<p><strong>UPDATE</strong></p>

<p>I switched from the minified version to the developer version of the jQuery library and found the part of the jQuery library that the error is occurring, <em>line 2467 of jQuery v1.5.1.js</em>.</p>

<pre><code> if ( handle ) {
      handle.apply( elem, data );
 } 
</code></pre>

<p>But at this time I cannot trace it back to where the exact start of this came from.</p>

<p><strong>END UPDATE</strong></p>

<p>I'm running into an issue that I cannot sort out. I have the following code block that uses jQuery 1.5.1:</p>

<pre><code>$('#agencyForm').submit(function(e){
    // form field validations
    var zipRegex = /^[0-9]{5}(-[0-9]{4})?$/;
    var agencyNameRegex = /^[a-zA-Z\-\ \'\.]+$/;
    var cityRegex = /^[^0-9]+$/;
    var errMsg = '';
    if($('#agency_nm').val().length == 0) {
        errMsg += 'Agency Name is missing.\n';
    } else if (!agencyNameRegex.test($('#agency_nm').val())) {
        errMsg += 'Agency Name can only contain letters, hyphens, periods, and apostrophes.\n';
    }
    if($('#agency_address1_tx').val().length == 0) {
        errMsg += 'Address 1 is missing.\n';
    }
    if($('#agency_city_nm').val().length == 0) {
        errMsg += 'City is missing.\n';
    } else if (!cityRegex.test($('#agency_city_nm').val())) {
        errMsg += 'City can only contain letters and punctuation.\n';
    }
    if($('#agency_state_nm').val().length == 0) {
        errMsg += 'State is missing.\n';
    }
    if($('#agency_postal_cd').val().length == 0) {
        errMsg += 'Zip Code is missing.\n';
    } else if (!zipRegex.test($('#agency_postal_cd').val())) {
        errMsg += 'Zip Code must be in the format of 99999 or 99999-9999.\n';
    }
    if(errMsg.length &gt; 0) {
        alert('There were errors with your submission.\n\n' + errMsg);
        e.preventDefault();
    }
});
</code></pre>

<p>On practically every server and browser this is run on, there are no issues. But we are testing some new servers that are coming in to replace the existing set, and this code is throwing a "too much recursion" error only when the validation passes. In other words, when nothing should be happening.</p>

<p>This makes no sense to me on multiple levels. I have checked and made sure the codebases are the same on the servers that fail and the servers that work fine. There are no differences.</p>

<p>Can anyone come up with a reason why I would get an error only on a certain server? </p>
