BlueRose
06-08-2003, 05:57 AM
I'm having a problem with the Javascript navigation on a web page I'm attempting to build, and was hoping someone here would have some ideas how to fix it before I have to scrap my design.
I had gotten the bright idea to have as navigation rollovers that loaded not only several new graphics, but also changed the links on those graphics. And when you roll over another navigation graphic, the destination graphics and links change yet again. I had no problem implementing the changes to the graphics, but learned that I couldn't use link names to change the link destination in Javascript, and had to change them according to their numbers instead. Unfortunately, the navigation appears after the content, so just about every page has the navigation links in a different position.
Because most of the pages are going to be dynamically generated from a content management system (MovableType), I was hoping to have the navigation dynamically generated also so I wouldn't have to update all the Javascript rollovers each time I added a link to the page. To that end, I tried making a little Javascript utilizing the anchors array to count the number of links currently on each page so I could figure out the position of the navigation links from that, but for some strange reason the Javascript only returns a count of 5, even if there are dozens of links on the page.
So, if anyone has any ideas as to why said Javascript isn't returning the correct number of links, or if anyone has any ideas as to how I can make the navigation work without much pain, please let me know what I'm doing wrong. I'd really rather not have to start all over again at this point!:rolleyes: The page in question is currently in a state of disrepair at:
http://weddingmusic.retrofit.net
Thanks in advance,
Michelle
I had gotten the bright idea to have as navigation rollovers that loaded not only several new graphics, but also changed the links on those graphics. And when you roll over another navigation graphic, the destination graphics and links change yet again. I had no problem implementing the changes to the graphics, but learned that I couldn't use link names to change the link destination in Javascript, and had to change them according to their numbers instead. Unfortunately, the navigation appears after the content, so just about every page has the navigation links in a different position.
Because most of the pages are going to be dynamically generated from a content management system (MovableType), I was hoping to have the navigation dynamically generated also so I wouldn't have to update all the Javascript rollovers each time I added a link to the page. To that end, I tried making a little Javascript utilizing the anchors array to count the number of links currently on each page so I could figure out the position of the navigation links from that, but for some strange reason the Javascript only returns a count of 5, even if there are dozens of links on the page.
So, if anyone has any ideas as to why said Javascript isn't returning the correct number of links, or if anyone has any ideas as to how I can make the navigation work without much pain, please let me know what I'm doing wrong. I'd really rather not have to start all over again at this point!:rolleyes: The page in question is currently in a state of disrepair at:
http://weddingmusic.retrofit.net
Thanks in advance,
Michelle