Knowing which link was clicked

M

mrhaydel

I have a page on a website with two downloadable files: an install, and
an update. I need to know which link (install or update) the user
clicks on so that two pages later, after reading a license agreement,
they are brought to the right file. I think what I basically need is
when they click on either the install or update link, pass in a
parameter/variable that can be used a few pages later that will allow
that page to know which file to give them.

It kind of looks like this:


a page with:
install link update link
\ /
license agreement page
|
download page

So, I want the download page to know what link was clicked, which in
turn would allow it know which file to serve. Hope this isn't to
convoluted!
 
L

Lee

(e-mail address removed) said:
I have a page on a website with two downloadable files: an install, and
an update. I need to know which link (install or update) the user
clicks on so that two pages later, after reading a license agreement,
they are brought to the right file. I think what I basically need is
when they click on either the install or update link, pass in a
parameter/variable that can be used a few pages later that will allow
that page to know which file to give them.

It kind of looks like this:


a page with:
install link update link
\ /
license agreement page
|
download page

So, I want the download page to know what link was clicked, which in
turn would allow it know which file to serve. Hope this isn't to
convoluted!

There's no need to do anything with the install link, since there
are only two ways to get to the download page: either from the
update link, or from a link on the license agreement page (the case
of somebody bookmarking the page or typing it in manually can, I
assume, be treated as if they came from the update link).

Have the link on the license agreement page send a parameter to the
download page (or even link to a different download page).

<a href="downloadpage.html?install">I agree</a>
 
D

David Dorward

I have a page on a website with two downloadable files: an install, and
an update. I need to know which link (install or update) the user
clicks on so that two pages later, after reading a license agreement,
they are brought to the right file. I think what I basically need is
when they click on either the install or update link, pass in a
parameter/variable that can be used a few pages later that will allow
that page to know which file to give them.

Link to /license/?for=downloadable or /license/?for=update

Then check the query string to generate the link at the bottom.

You /could/ do this with client side JavaScript, but since it is a pretty
essential part of the page, doing so isn't a good idea. This should be
handled server side, and the specifics depend on what your server supports.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top