title: Wicket Ajax with upload field -  in IE
body: <ol>
  <li><p>I have an upload field in a wicket form.</p></li>
  <li><p>I use AjaxFormSubmitBehavior with the event "onchange" so when the user just select a file and I already do upload and display the image in a little panel beside.</p></li>
  <li><p>It's working fine in Firefox &amp; Chrome but not in IE (IE8 / IE9). In IE when the user selects a file:</p>
  
  <p>a. A new window with the response code (in a tag called "ajax-response") is opened. </p>
  
  <p>b. The Wicket Ajax Debug box says: "ERROR: Error parsing response".</p></li>
  <li><p>Note that other Ajax calls in this application are working well in IE too.</p></li>
  <li><p>I'm attaching the relevant piece of code.  Thanks in advance, David</p></li>
  </ol>
  
  <p>private FileUploadField file;</p>
  
  <pre><code>        FileUploadField fuf = new FileUploadField("file");
  
          AjaxFormSubmitBehavior ajaxFormSubmitBehavior = new AjaxFormSubmitBehavior("onchange") {
  
              private static final long serialVersionUID = 1L;
  
              @Override
              protected void onSubmit(AjaxRequestTarget target) {
  
                  MlCmpBlob img = handleUpload();
  
                  ImageDisplayPanel imageDisplayPanelTmp = new ImageDisplayPanel("uploadImgDisplay", new Model&lt;MlCmpBlob&gt;(img));
                  imageDisplayPanel.replaceWith(imageDisplayPanelTmp);
                  imageDisplayPanel = imageDisplayPanelTmp;
                  target.add(imageDisplayPanel);
              }
  
              @Override
              protected void onError(AjaxRequestTarget target) {
                  target.add(wizardFormFeedback);
              }
          };
          ajaxFormSubmitBehavior.setDefaultProcessing(false);
          fuf.add(ajaxFormSubmitBehavior);
          add(file = fuf);
  </code></pre>