Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

webpage: conditional transfer to another page

Posted on 2014-02-08
6
Medium Priority
?
181 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 27

Accepted Solution

by:
skullnobrains earned 1500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

916 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