Redirect after clicking download link in html
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
add a comment |
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
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
add a comment |
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
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
javascript html5
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
Just love simple solutions... thank you so much Sam
– Greg T
Nov 15 '18 at 0:12
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Just love simple solutions... thank you so much Sam
– Greg T
Nov 15 '18 at 0:12
add a comment |
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.
Just love simple solutions... thank you so much Sam
– Greg T
Nov 15 '18 at 0:12
add a comment |
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.
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.
answered Nov 14 '18 at 22:20
SamSam
2,40511928
2,40511928
Just love simple solutions... thank you so much Sam
– Greg T
Nov 15 '18 at 0:12
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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