Solved

webpage: conditional transfer to another page

Posted on 2014-02-08
6
157 Views
Last Modified: 2014-03-07
I would like to show a button on a webpage ONLY if some particular page as already been visited. Is there a way to do this kind of "conditional" linking with HTML, CSS, or JavaScript?

For example, I have pages A and B. I would like to show a button on page A then when clicked takes me to page B, but ONLY if page B has already been visited. If page B has NOT been visited, I don't want to show the button on page A.

Thanks for any help.

Mark
0
Comment
Question by:karnac2020
  • 2
  • 2
  • 2
6 Comments
 
LVL 2

Expert Comment

by:pierrejeanes
ID: 39844935
But how the are going to visit page b if the button only appears if they have visited page b? Unless they get to page b by direct link?
0
 
LVL 2

Expert Comment

by:pierrejeanes
ID: 39844940
Perhaps using cookies or user accounts ( wich require some database)
0
 

Author Comment

by:karnac2020
ID: 39845263
They get to page B via another link or path. The current website is built with ASP.NET so it uses a MSSQL database.
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 27

Accepted Solution

by:
skullnobrains earned 500 total points
ID: 39892901
#yourlink{
display:none;
}

#yourlink:visited{
display:inline;
}

the above requires that the exact same url was visited and is easy to bypass if the users want to

you can devise similar solutions is js/jquery

if you need something more robust, you'll have to do it server side : identify which clients visited siteB and store the info in a database. read the db when generating page A and include the button if needed.
0
 

Author Closing Comment

by:karnac2020
ID: 39913127
nice solution
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 39913460
thanks. beware this is trivial to bypass for many users
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question