English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I've made a list of links and defined the active link, so people know what link they've just pressed and ergo, what page they are on (nice!). However I link these to different pages with the same navigation bar, but the active state doesn't get recognised because the page is new and refreshed, defeating the purpose of active links (stupid!). What is the workaround for this problem, and is there a way to do this without any scripting. If scripting is needed can it be done with php includes? Little help.

2007-09-09 04:51:56 · 2 answers · asked by jasemuk 2 in Computers & Internet Programming & Design

Yes, I think you can help me. I don't know what you're talikgn about but I catch on quickly. How do I pass a get variable onto another page? This is a form function not a link function. Tell me more please...I am intrigued!

2007-09-09 12:48:42 · update #1

2 answers

I think you've misunderstood what the "active" pseudo-class does in CSS. It doesn't have anything to do with what page you're on - it simply controls the style of the link while it's being pressed.

Unfortunately CSS doesn't have any way of knowing what page you're on, so you will have to do this with scripting - PHP, since you're using that. Exactly how you do it will depend on how you're generating the pages.

2007-09-09 23:24:47 · answer #1 · answered by Daniel R 6 · 0 0

Simply pass the active link as a get or session variable, then read it into the new page.

2007-09-09 12:32:27 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers