|
Hmmm I guess I'll try this here because it's more centered around JS. So I have a single PHP document that consolidates my head, my tool menubar, page content and a footer. My overall goal is to be able to have the active page on the menubar to be highlighted and the link disabled without having to stray from my original idea of organizing the pages. I figure declaring a variable somewhere in the clusterfuck to identify what page I am on then have Javascript tell the header.php (where the menubar is) to do the dirty work. The issue I have to finding a place to declare the variable. Here is a general idea of what's going on in the main page of index.php: code:
All the Javascript action is going to be contained in header.php, so I need a good place to declare a single varaible: code:
tl;dr edit: I guess I really just would like to know an easy way to declare a variable in my index.php without breaking everything and have it read into the header.php. nooge fucked around with this message at 15:31 on May 4, 2009 |
# ¿ May 4, 2009 15:26 |
|
|
# ¿ May 7, 2024 15:53 |
|
Supervillin posted:Definitely a PHP question, not JS, but here you go: Awesome that worked perfectly. I'm sure the 2nd method works great too but I'm not entirely fluent in PHP and don't like copy and pasting without fully understanding. I'll sit down tonight and decipher what you did. Thanks a lot!
|
# ¿ May 4, 2009 16:17 |
|
Another small question... after I used that code it looks and works great - except it lags a bit when loading the picture compared to those around it even though it it is the same size. Any way to speed up the process or am I stuck with that small (.25 second) lag?
|
# ¿ May 6, 2009 14:59 |