Preserved Topic: Changing active menu item |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: seattle |
posted 08-02-2001 18:35
Hello all, |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-02-2001 19:12 |
Paranoid (IV) Inmate From: seattle |
posted 08-02-2001 19:41
At the top of each page (which are drilldown frames), I put this "internal" include menu that by choosing a menu item, brings up the life history or meristic or whichever data for the fish species selected. I am using cold fusion (hence the cf tags). here is what my menu and style tags look like right now. |
Neurotic (0) Inmate Newly admitted |
posted 08-02-2001 20:27
might help if we could see the site for reference. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-02-2001 20:40
I don't use ColdFusion, so I can't help you with that, but here's how I would do that in PHP: |
Paranoid (IV) Inmate From: seattle |
posted 08-02-2001 22:13
Thanks mr. max, I will try to work that around for cold fusion. I had that in mind, but was kind of looking for a way to do it with one smaller piece of script that would dymanically use the document name (document.formname...) and then change the background and text colors of the related link <td>. It seemed like there would a more "code efficient" method. Hope that does not sound like I am grateful for your help though, because I am. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-02-2001 22:35
Well, having a JavaScript that will change links wouldn't be the most code efficient method, because JS is executed at the client side after the page is served to the browser. It is best to do the change on server side before serving the page. Anyway, if you're looking for the most code efficient method, then simply create an array of all links and use for loop to print them out (of course, in every iteration you should put if statement that will check if it is current page and output it accordingly). |
Paranoid (IV) Inmate From: seattle |
posted 08-02-2001 22:40
Well that makes sense. thanks a bunch. |