Posted By

temanuel on 11/25/13


Tagged

auto automatic auto-start


Versions (?)

Download AutoStart


 / Published in: JavaScript
 

  1.  
  2. May need modified depending on downloaded file type - depending on the browser, PDF's will try to open in the actual iFrame
  3.  
  4.  
  5. // FROM - http://stackoverflow.com/questions/156686/how-to-start-automatic-download-of-a-file-in-internet-explorer
  6.  
  7.  
  8. $(function() {
  9. $(window).bind('load', function() {
  10. $('.download').delay(1500).append('<iframe width="0" height="0" frameborder="0" src="[YOUR FILE SRC]"></iframe>');
  11. });
  12. });
  13.  
  14.  
  15.  
  16.  
  17. <div class="download"></div>
  18.  

Report this snippet  

You need to login to post a comment.