0

when user submit the form, a png file will download automatically without url change. how it's possible in jquery any idea? I am trying....

<script>
 jQuery( "#gform_3" ).submit(function( event ) {
 window.open('https://s3-us-west-2.amazonaws.com/s.cdpn.io/172905/test.pdf', '_blink', 'download');
  event.preventDefault();
});
</script>
Rubel Hossain
  • 2,503
  • 2
  • 22
  • 23
  • Potential duplicate: https://stackoverflow.com/questions/5192917/force-download-through-js-or-query – Taplar Mar 17 '20 at 15:59
  • have some questions, will this file which is going to download, is a static file or a random file, which will be downloadable after submit button task is finished, or this file will be a sample file, which is tatically avaialable ? – Dupinder Singh Mar 17 '20 at 17:58
  • static pdf or png file will download – Rubel Hossain Mar 17 '20 at 18:09

0 Answers0