Solved

webpage: conditional transfer to another page

Posted on 2014-02-08
6
156 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
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 
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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

808 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