Redirect after clicking download link in html












0















I have a link in my page that downloads a PDF file however after they have clicked either of the download links, I would like to take them to another page.



The page gives them one of 2 choices for selecting a download file but I only wish to allow them to make one choice and then exit to another page.



My code is as follows:



<div class="columns medium-6">
<h3 class="text-center">7 Tips for Creating a <br />Happy Workplace</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-7-tips-workplace.png" height="250px" alt="7 Tips for Creating a Happy Workplace eBook">
<p style="font-size: 18px;" class="text-center">Discover how you can make your workplace a healthier environment by simply making being a happy place to work for everyone</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-7-tips">
<label>I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>
<div class="columns medium-6">
<h3 class="text-center">Your Short Guide to Leasing a Commercial Office Space</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-leasing-commercial-office.png" alt="Guide to Leasing Commercial Office" height="250">
<p style="font-size: 18px;" class="text-center">Understand what you should be considering before leasing any commercial office space. Being forewarned and prepared could save you lots
of money and grief</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-leasing">
<label for="choice-leasing">I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192012" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>









share|improve this question























  • Suggest you open a dialog or modify existing html when they click those links and expose link to page you want them to continue to. There is no way to track download status using javascript in the window

    – charlietfl
    Nov 14 '18 at 21:16
















0















I have a link in my page that downloads a PDF file however after they have clicked either of the download links, I would like to take them to another page.



The page gives them one of 2 choices for selecting a download file but I only wish to allow them to make one choice and then exit to another page.



My code is as follows:



<div class="columns medium-6">
<h3 class="text-center">7 Tips for Creating a <br />Happy Workplace</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-7-tips-workplace.png" height="250px" alt="7 Tips for Creating a Happy Workplace eBook">
<p style="font-size: 18px;" class="text-center">Discover how you can make your workplace a healthier environment by simply making being a happy place to work for everyone</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-7-tips">
<label>I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>
<div class="columns medium-6">
<h3 class="text-center">Your Short Guide to Leasing a Commercial Office Space</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-leasing-commercial-office.png" alt="Guide to Leasing Commercial Office" height="250">
<p style="font-size: 18px;" class="text-center">Understand what you should be considering before leasing any commercial office space. Being forewarned and prepared could save you lots
of money and grief</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-leasing">
<label for="choice-leasing">I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192012" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>









share|improve this question























  • Suggest you open a dialog or modify existing html when they click those links and expose link to page you want them to continue to. There is no way to track download status using javascript in the window

    – charlietfl
    Nov 14 '18 at 21:16














0












0








0








I have a link in my page that downloads a PDF file however after they have clicked either of the download links, I would like to take them to another page.



The page gives them one of 2 choices for selecting a download file but I only wish to allow them to make one choice and then exit to another page.



My code is as follows:



<div class="columns medium-6">
<h3 class="text-center">7 Tips for Creating a <br />Happy Workplace</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-7-tips-workplace.png" height="250px" alt="7 Tips for Creating a Happy Workplace eBook">
<p style="font-size: 18px;" class="text-center">Discover how you can make your workplace a healthier environment by simply making being a happy place to work for everyone</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-7-tips">
<label>I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>
<div class="columns medium-6">
<h3 class="text-center">Your Short Guide to Leasing a Commercial Office Space</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-leasing-commercial-office.png" alt="Guide to Leasing Commercial Office" height="250">
<p style="font-size: 18px;" class="text-center">Understand what you should be considering before leasing any commercial office space. Being forewarned and prepared could save you lots
of money and grief</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-leasing">
<label for="choice-leasing">I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192012" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>









share|improve this question














I have a link in my page that downloads a PDF file however after they have clicked either of the download links, I would like to take them to another page.



The page gives them one of 2 choices for selecting a download file but I only wish to allow them to make one choice and then exit to another page.



My code is as follows:



<div class="columns medium-6">
<h3 class="text-center">7 Tips for Creating a <br />Happy Workplace</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-7-tips-workplace.png" height="250px" alt="7 Tips for Creating a Happy Workplace eBook">
<p style="font-size: 18px;" class="text-center">Discover how you can make your workplace a healthier environment by simply making being a happy place to work for everyone</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-7-tips">
<label>I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>
<div class="columns medium-6">
<h3 class="text-center">Your Short Guide to Leasing a Commercial Office Space</h3> <img src="https://www.maylake.com.au/_assets/images/mini-guide/bookcover-leasing-commercial-office.png" alt="Guide to Leasing Commercial Office" height="250">
<p style="font-size: 18px;" class="text-center">Understand what you should be considering before leasing any commercial office space. Being forewarned and prepared could save you lots
of money and grief</p>
<div class="choose">
<input type="radio" name="choice-books" id="choice-leasing">
<label for="choice-leasing">I would like to receive a copy of the eBook</label>
<div class="reveal-if-active">
<p class="text-center"><a href="/LiteratureRetrieve.aspx?ID=192012" class="button radius text-center">DOWNLOAD Now</a> </p>
</div>
</div>
</div>






javascript html5






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 '18 at 21:04









Greg TGreg T

62




62













  • Suggest you open a dialog or modify existing html when they click those links and expose link to page you want them to continue to. There is no way to track download status using javascript in the window

    – charlietfl
    Nov 14 '18 at 21:16



















  • Suggest you open a dialog or modify existing html when they click those links and expose link to page you want them to continue to. There is no way to track download status using javascript in the window

    – charlietfl
    Nov 14 '18 at 21:16

















Suggest you open a dialog or modify existing html when they click those links and expose link to page you want them to continue to. There is no way to track download status using javascript in the window

– charlietfl
Nov 14 '18 at 21:16





Suggest you open a dialog or modify existing html when they click those links and expose link to page you want them to continue to. There is no way to track download status using javascript in the window

– charlietfl
Nov 14 '18 at 21:16












1 Answer
1






active

oldest

votes


















1














I would change your a elements to something like this:



<a target="_blank" href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center" onclick="window.location='http://google.com';">DOWNLOAD Now</a> 


This will take them to google.com at the same time they are downloading the pdf.






share|improve this answer
























  • Just love simple solutions... thank you so much Sam

    – Greg T
    Nov 15 '18 at 0:12











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53308688%2fredirect-after-clicking-download-link-in-html%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I would change your a elements to something like this:



<a target="_blank" href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center" onclick="window.location='http://google.com';">DOWNLOAD Now</a> 


This will take them to google.com at the same time they are downloading the pdf.






share|improve this answer
























  • Just love simple solutions... thank you so much Sam

    – Greg T
    Nov 15 '18 at 0:12
















1














I would change your a elements to something like this:



<a target="_blank" href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center" onclick="window.location='http://google.com';">DOWNLOAD Now</a> 


This will take them to google.com at the same time they are downloading the pdf.






share|improve this answer
























  • Just love simple solutions... thank you so much Sam

    – Greg T
    Nov 15 '18 at 0:12














1












1








1







I would change your a elements to something like this:



<a target="_blank" href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center" onclick="window.location='http://google.com';">DOWNLOAD Now</a> 


This will take them to google.com at the same time they are downloading the pdf.






share|improve this answer













I would change your a elements to something like this:



<a target="_blank" href="/LiteratureRetrieve.aspx?ID=192014" class="button radius text-center" onclick="window.location='http://google.com';">DOWNLOAD Now</a> 


This will take them to google.com at the same time they are downloading the pdf.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 14 '18 at 22:20









SamSam

2,26911927




2,26911927













  • Just love simple solutions... thank you so much Sam

    – Greg T
    Nov 15 '18 at 0:12



















  • Just love simple solutions... thank you so much Sam

    – Greg T
    Nov 15 '18 at 0:12

















Just love simple solutions... thank you so much Sam

– Greg T
Nov 15 '18 at 0:12





Just love simple solutions... thank you so much Sam

– Greg T
Nov 15 '18 at 0:12




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53308688%2fredirect-after-clicking-download-link-in-html%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bressuire

Vorschmack

Quarantine