Solved

webpage: conditional transfer to another page

Posted on 2014-02-08
6
155 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 26

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 26

Expert Comment

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

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
This article discusses four methods for overlaying images in a container on a web page
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

777 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