Posted By


temanuel on 11/25/13

Tagged


Statistics


Viewed 154 times
Favorited by 0 user(s)

Download AutoStart


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.