title: Change iFrame src on ajax complete
body: <p>using jQuery's $.ajax() I want to retrieve some information from the server, and then, based on that info, change the src attribute of an iframe. </p>
  
  <p>Something like:</p>
  
  <pre><code>$.ajax(
                  {
                      url: "someUrl.aspx/getInfo",
                      dataType: "json",
                      data: "{'data':{'data1':'data1'}}",
                      type: "post",
                      contentType: "application/json; charset=utf-8",
                      complete: function(data, stat) {
                          if (stat == "success" ) 
                          {
                             var src = JSON.parse(jsondata.responseText).d.src
                             $('#myframe').attr("src",src);
                          } 
  
                      }
                  }
                  );
  </code></pre>
  
  <p>The page I am trying to load is returning a PDF file, so the goal is to show the user the dialog to choose between downloading or opening that file. On IE7 and 8 the browser is showing the info bar with this message : "To help protect your security, Internet Explorer blocked this site from downloading files to your computer. Click here for options."</p>
  
  <p>Changing the iframe's src attribute OUTSIDE the ajax call works fine and the dialog to choose between opening or saving the PDF is shown.</p>
  
  <p>Any workarounds to avoid the info bar showing? 
  Thanks in advance.</p>