Closed Thread Icon

Preserved Topic: HTML Navi with --include-- Help! (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20469" title="Pages that link to Preserved Topic: HTML Navi with --include-- Help! (Page 1 of 1)" rel="nofollow" >Preserved Topic: HTML Navi with --include-- Help! <span class="small">(Page 1 of 1)</span>\

 
patric design
Bipolar (III) Inmate

From: 290 km/h, fast lane, Autobahn, Germany
Insane since: Feb 2001

posted posted 03-18-2002 14:24

I am working on a non-frames HTML page and i am trying to include the navigation part of it in a separate file and then to put that into the main page via an include SSI. This is all for ease of changing/adding the main menu. Now my question is: How can I define an "active" state for a menu button when the page is (re)loaded on a click? Mouseover and out are fine but i do want the active button to stand out somewhat...
Any ideas?

<´¯`·.¸ Patric ¸.·´¯`>

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 03-18-2002 17:11

The first thing that comes to mind is the GurusNetwork navigation. That was done by Doc, and is included by SSI. It determines the directory that you're in, and then presents the correct image. I've been hoping Doc would give us a tutorial on that version (Javascript), and that maybe someone would come up with a PHP version as well..

Check the source code at gurusnetwork.com and that should help.

silence
Maniac (V) Inmate

From: soon to be "the land down under"
Insane since: Jan 2001

posted posted 03-18-2002 22:41

Okay, you can get the document name from an include and use that with JS to determine the active state or not.

example:

code:
<script language="javascript">
var current_document = '<!--#echo var="DOCUMENT_NAME"-->';
</script>



Now you have a variable called current_document that you can use to determine what page is currently displayed.

Also, DL-44's SSI tutorial is great stuff, check it out.

:edit: Also, when using SSI to assign the variable, it might not work if you use comments to ensure older browser compatibility. For example, the "<-- begin" and "// end -->" lines may need to be removed in order for the code to work. This has something to do with the way JS parses the code for quotation marks. :edit:



[This message has been edited by silence (edited 03-18-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu