title: node webkit: export data to csv and prompt the user to save the file
body: <p>I could implement the export data to csv on node webkit with node fs modules. But now I want to prompt the user to save the file in his/her desired location. Like the download pop-up in case of html. I tried doing on the lines of this <a href="https://stackoverflow.com/questions/13070194/prompt-a-csv-file-to-download-as-pop-up-using-node-js-and-node-csv-parser-node">code</a> and even this <a href="https://stackoverflow.com/questions/17558126/ask-user-where-to-save-file-with-node-js">file dialog</a>. Could someone help me find a way out of this. Here's my code.</p>
  
  <pre><code>fs.writeFile("export.csv", data, function(err) {
      if(err) {
         console.log(err);
      } else {
          $('#export_file').show();
          $('#export_file input').on('change', function (event) {
              console.log($(this).val());
              console.log("The file was saved!");
          });
      }
  });
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="export_file" style="display:none"&gt;
      &lt;input type="file" nwsaveas nwworkingdir="/data/input/" /&gt;
  &lt;/div&gt;
  </code></pre>