title: open save as dialog from the javascript
body: <p>I need to realize the following scenario: I have a html page, where is a button and some textboxes. When I click the button i want to create an xml from the textboxes data and send this xml to the server, than server returns this xml back as an attachment and I will have a Save As dialog and I can save this xml locally. I have the following jquery function which send the xml to the server:</p>
  
  <pre><code>        function GetXml() {
              var xmlData = '{"xml": "&lt;test&gt;test&lt;/test&gt;"}';
              var contentType = "application/json";
              var eDoc = "";
              $.ajax({
                  type: 'POST',                         
                  url: 'http://localhost/xmlservice.svc/rest/GetXmlToSave',
                  data: xmlData,
                  contentType: contentType,
                  success: function (result) {                        
                      alert(result);
                  },
                  error: function (result) {                      
                      alert(result);
                  },
                  async: false,                   
              });
              return result;
          }
  </code></pre>
  
  <p>But i don't know hot to force Save As dialog from javascript with the returned xml from the server. </p>
  
  <p>I can realize it with the classic submit button:</p>
  
  <pre><code>&lt;form action='http://localhost/xmlservice.svc/rest/GetXmlToSave' method="POST" runat="server" &gt;                                
              &lt;input type="submit"/&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>But in this scenario I cannot create xml on the client side.</p>
  
  <p>Is it possible to force Save As dialog from the javascript?</p>
  
  <p>thanks.</p>