Redirect user after clicking on save button [duplicate]





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1
















This question already has an answer here:




  • detecting when the “File download” popup is closed

    5 answers



  • How do I redirect users after submit button click?

    7 answers




I have an <a> tag on the page like below:



<a href="/-/media/Wallpapers/wallpaper_nokia.jpg" download="">Download Wallpaper</a>


When the user clicks on the link the save as button opens up for the user to save the image. What I want to do is to redirect user to the home page after user clicks on the save button.



Is there any way to achieve this in javascript?










share|improve this question















marked as duplicate by R3tep, Kiran Shahi, Community Jan 10 at 18:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 1





    you want to add function to windows download popup?

    – brk
    Jan 3 at 8:08













  • You can check if the downloaded file exists, but it will be not after clicking save, only after the download is completed.

    – Hagai Wild
    Jan 3 at 8:09











  • where is your save button?

    – Kiran Shahi
    Jan 3 at 8:11


















1
















This question already has an answer here:




  • detecting when the “File download” popup is closed

    5 answers



  • How do I redirect users after submit button click?

    7 answers




I have an <a> tag on the page like below:



<a href="/-/media/Wallpapers/wallpaper_nokia.jpg" download="">Download Wallpaper</a>


When the user clicks on the link the save as button opens up for the user to save the image. What I want to do is to redirect user to the home page after user clicks on the save button.



Is there any way to achieve this in javascript?










share|improve this question















marked as duplicate by R3tep, Kiran Shahi, Community Jan 10 at 18:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 1





    you want to add function to windows download popup?

    – brk
    Jan 3 at 8:08













  • You can check if the downloaded file exists, but it will be not after clicking save, only after the download is completed.

    – Hagai Wild
    Jan 3 at 8:09











  • where is your save button?

    – Kiran Shahi
    Jan 3 at 8:11














1












1








1









This question already has an answer here:




  • detecting when the “File download” popup is closed

    5 answers



  • How do I redirect users after submit button click?

    7 answers




I have an <a> tag on the page like below:



<a href="/-/media/Wallpapers/wallpaper_nokia.jpg" download="">Download Wallpaper</a>


When the user clicks on the link the save as button opens up for the user to save the image. What I want to do is to redirect user to the home page after user clicks on the save button.



Is there any way to achieve this in javascript?










share|improve this question

















This question already has an answer here:




  • detecting when the “File download” popup is closed

    5 answers



  • How do I redirect users after submit button click?

    7 answers




I have an <a> tag on the page like below:



<a href="/-/media/Wallpapers/wallpaper_nokia.jpg" download="">Download Wallpaper</a>


When the user clicks on the link the save as button opens up for the user to save the image. What I want to do is to redirect user to the home page after user clicks on the save button.



Is there any way to achieve this in javascript?





This question already has an answer here:




  • detecting when the “File download” popup is closed

    5 answers



  • How do I redirect users after submit button click?

    7 answers








javascript html5






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 8:07









R3tep

8,18382962




8,18382962










asked Jan 3 at 8:05









MiladMilad

16710




16710




marked as duplicate by R3tep, Kiran Shahi, Community Jan 10 at 18:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by R3tep, Kiran Shahi, Community Jan 10 at 18:10


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1





    you want to add function to windows download popup?

    – brk
    Jan 3 at 8:08













  • You can check if the downloaded file exists, but it will be not after clicking save, only after the download is completed.

    – Hagai Wild
    Jan 3 at 8:09











  • where is your save button?

    – Kiran Shahi
    Jan 3 at 8:11














  • 1





    you want to add function to windows download popup?

    – brk
    Jan 3 at 8:08













  • You can check if the downloaded file exists, but it will be not after clicking save, only after the download is completed.

    – Hagai Wild
    Jan 3 at 8:09











  • where is your save button?

    – Kiran Shahi
    Jan 3 at 8:11








1




1





you want to add function to windows download popup?

– brk
Jan 3 at 8:08







you want to add function to windows download popup?

– brk
Jan 3 at 8:08















You can check if the downloaded file exists, but it will be not after clicking save, only after the download is completed.

– Hagai Wild
Jan 3 at 8:09





You can check if the downloaded file exists, but it will be not after clicking save, only after the download is completed.

– Hagai Wild
Jan 3 at 8:09













where is your save button?

– Kiran Shahi
Jan 3 at 8:11





where is your save button?

– Kiran Shahi
Jan 3 at 8:11












1 Answer
1






active

oldest

votes


















0














Yes there is:



// similar behavior as an HTTP redirect
window.location.replace("http://stackoverflow.com");

// similar behavior as clicking on a link
window.location.href = "http://stackoverflow.com";





share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Yes there is:



    // similar behavior as an HTTP redirect
    window.location.replace("http://stackoverflow.com");

    // similar behavior as clicking on a link
    window.location.href = "http://stackoverflow.com";





    share|improve this answer




























      0














      Yes there is:



      // similar behavior as an HTTP redirect
      window.location.replace("http://stackoverflow.com");

      // similar behavior as clicking on a link
      window.location.href = "http://stackoverflow.com";





      share|improve this answer


























        0












        0








        0







        Yes there is:



        // similar behavior as an HTTP redirect
        window.location.replace("http://stackoverflow.com");

        // similar behavior as clicking on a link
        window.location.href = "http://stackoverflow.com";





        share|improve this answer













        Yes there is:



        // similar behavior as an HTTP redirect
        window.location.replace("http://stackoverflow.com");

        // similar behavior as clicking on a link
        window.location.href = "http://stackoverflow.com";






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 3 at 17:13









        KorovjovKorovjov

        14816




        14816

















            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            How to fix TextFormField cause rebuild widget in Flutter

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith