title: ASP.NET 2.0 callbacks not working correctly in Firefox
body: <p>I've implemented a .NET Web control that uses the callback structure implemented in ASP.Net 2.0.  It's an autodropdown control, and it works correctly in IE 6.0/7.0 and Google Chrome.  Here's the relevant callback function:</p>
  
  <pre><code>function ReceiveServerData(args, context)
  {
  document.getElementById(context).style.zIndex = 300;
  document.getElementById(context).style.visibility = 'visible';
  document.getElementById(context).innerHTML = args;
  fixHover(context);
  }
  </code></pre>
  
  <p>In Firefox, "args" is always the same data, so the innerHTML of the <code>&lt;div&gt;</code> that is the display for my dropdown always shows the same items.  I've doublechecked my client-side code, and the right information is being sent client->server and in return server-> client.</p>
  
  <p>Of note, in the "WebForm_DoCallback" function created by the .NET framework, the following snippet is getting called:</p>
  
  <pre><code>if (setRequestHeaderMethodExists) {
  xmlRequest.onreadystatechange = WebForm_CallbackComplete;
  callback.xmlRequest = xmlRequest;
  xmlRequest.open("POST", theForm.action, true);
  xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  xmlRequest.send(postData);
  return;
  }
  </code></pre>
  
  <p>and the callback function ReceiveServerData is called both on <code>xmlRequest.open("POST", theForm.action, true);</code> and <code>xmlRequest.send(postData);</code>. I wonder if this is causing an error, but I'm at the end of my debugging skills.</p>
  
  <p>Edited to add -- ReceiveServerData is not being called twice the very first time I use the dropdown -- in fact, the dropdown works correctly for the very first keystroke. It stops working, and doubles the callback with old return data, after the first keystroke.</p>