title: Opening a base64 PDF in javascript in IE6
body: <p>In javascript, I have a variable which holds a pdf in base64 (the pdf is generated in flex and passed to js). I want to open it in the browser (ie I want the browser to display the open/save dialog box letting the user open or save the pdf).</p>
  
  <p>I am using Data URI which works fine in some browsers, but is not supported in IE 6/7:</p>
  
  <pre><code>function getPdf(pdf) {
      window.open("data:application/pdf;base64," +pdf);
  }
  </code></pre>
  
  <p>How can I get this PDF to open in IE6 and 7? I've read about MHTML as an alternative to data uri but I don't think it can do what I need, or can it? For now I just need to open pdfs but in the future I will probably need to add support for xls (MS Excel) files too. Currently I'm using Flash's Filereference.save to let the user save the pdf to the disk then he can open it, but the client is insisting on giving the user a choice to open it automatically rather than forcing him to save it first.</p>