title: 'Http error 0' when loading dynamic form elements in drupal 6, when an upload field has a file selected
body: <p>I have a custom form implemented in a custom module in drupal 6.
  The form contains an upload field, a textfield and a select dropdown.
  When the dropdown fires a change event, two textfields are loaded dynamically below the dropdown through drupal AHAH.
  This is based largely on: <a href="http://drupal.org/node/331941" rel="nofollow">http://drupal.org/node/331941</a>
  The form functions correctly.</p>
  
  <p>However, if I happen to browse to a file from the upload field and then change the dropdown, I get the nasty 'http 0 error'. Note: I am not submitting the form. I am simply selecting the file to upload and then changing the dropdown to fire the change event.
  This problem is very much like: <a href="http://drupal.org/node/399676" rel="nofollow">http://drupal.org/node/399676</a>
  However the solution provided in the same thread: <a href="http://drupal.org/node/399676#comment-1438662" rel="nofollow">http://drupal.org/node/399676#comment-1438662</a> doesn't work for me.</p>
  
  <p>I changed the drupal_json call to drupal_get_js call as mentioned in the solution comment above, but I simply get an error alert containing some JSON.</p>
  
  <p>I believe the problem is to do with the headers set by drupal_json as seen in the definition here: <a href="http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_json/6" rel="nofollow">http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_json/6</a></p>
  
  <p>Any help much appreciated.</p>