Solved

webpage: conditional transfer to another page

Posted on 2014-02-08
6
150 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
Comment Utility
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
Comment Utility
Perhaps using cookies or user accounts ( wich require some database)
0
 

Author Comment

by:karnac2020
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 26

Accepted Solution

by:
skullnobrains earned 500 total points
Comment Utility
#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
Comment Utility
nice solution
0
 
LVL 26

Expert Comment

by:skullnobrains
Comment Utility
thanks. beware this is trivial to bypass for many users
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now