Hi have a page in my websit called artwork. On this page I have a submenu with the different categories. The photos from this categories will appear on the same page (artwork) coming from the database. For the sake of showing the active category I used the following function:
Is it the same link that is being clicked on, to see the active category and that you click on to go somewhere else?
If not, we’ll need more information about things. Perhaps a test page that demonstrates the problem - that’s the best way for us to get all of the information that we need about the situation.
Thanks - so when someone clicks on Hemmingway, they are taken to “http://diem.sothenwhat.com/peter_diem_artwork.cfm?artwork=hemingway” which results in a whole new page being loaded. Your attempt to adjust the class of the active link is not going to succeed, because the current page is replaced by a whole new page.
There are a couple of different ways to deal with this. One is to make the artwork changes without reloading the page, and the other is to allow the page to reload and look at the URL of the page when it loads up, to determine which link to make active.
The former option can be a cleaner option, but it does require serious changes to how your page works.
If you choose the latter option, you won’t need your click event and can search for the querystring as the page loads up, and set activesub with something like this:
Hi Paul. First of all, thank you for the responce!
Yes you’re right, I should have go for some form of Ajax in this, but I am way to lat to do that right now. So I will indeed go for the second option you gave me. Thank you so much…