title: How to prevent a stack overflow in IE due to unwanted recursion
body: <p>I've been searching since a while, to no avail.</p>
  
  <p>On a long form, I'm doing checks with javascript, and used the attribute "onchange" to do them. Recently, I discovered that on IE, the "onpropertychange" attribute should be used, as the "onchange" event is not handled correctly.</p>
  
  <p>So now, I have for example this kind of field (not all the fields have onKeyDown or onKeyUp events):</p>
  
  <pre><code>&lt;textarea name="shdescription" rows="1" cols="75" onKeyDown="textCounter(this,'shdesccounter',65)"
  onKeyUp="textCounter(this,'shdesccounter',65)" onchange="checkFormValue();" onpropertychange="checkFormValue();"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>And now each time I make a change on a field, then it takes a few seconds before registring the change and making the check. (and more when the change is made on the textarea I described.)</p>
  
  <p>Firing the IE F12 debugger, I noticed that a lot of <em>"SCRIPT28: Out of stack space"</em> and <em>"SCRIPT2343: Stack overflow at line:"</em> are fired. Following the execution of the script step by step, I noticed that the script is looping between two different ajax call to PHP scripts. I'm not sure we can talk of recursion actually, as I don't see any direct link between the two function.</p>
  
  <p>So I can think only of two possibilities: either there are change triggered in the field which trigger the the ajax call again, or I am doing something wrong with my ajax calls.</p>
  
  <p>Where should I look to resolve my problem? If there is need for more information, don't hesitate to ask.</p>
  
  <p>PS: I don't have any problem of this sort with FF/Chrome/Opera.</p>