Confirmation box dialog - Download and redirect?


#1

Hey there just wondering if anyone knew of a way that I can redirect someone to another page via the button once the form has been submitted but at the same time download the asset…?

Pretty confusing but I need this for a client!

Thanks in advance :slight_smile:


#2

Hey @erayner! I have a piece of code that redirects the visitor at the form confirmation dialogue. Would that work for you in this case? Simply throw this code into your form confirmation dialogue as a script, with before body end tag as the placement.

<script>
 
  (function(){
  
    // Your URL
    var url = 'https://your.urlredirect.com/';
  
    // Delay before the redirect takes place, in seconds
    var delay = 0;
    
     window.setTimeout(function() {
      window.open(url, '_top');
    }, delay * 1000);
  
  })();
 
</script>

#3

@erayner not sure why you would do this? It would be pretty confusing to the visitor. I would not want to be downloading something in the background and them be re-directed to another url Feels kinda sketch to me. IMHO.

But, @Stefano should work fine.