dauzy Posted September 12, 2008 Share Posted September 12, 2008 Hey guys needs some help here, I'm creating a site in php everything is pretty much done but there's only one thing left to be done. I need to make a link display as the active link on the page. Here's an example. Load page....(no links are active or home is active) clink on the contact page in the navigation menu....(that link becomes active and the link button becomes underlined and stays that way until another link is clicked. I was told that this can be done using javascript, but I have no experience with JS so can someone help me get started on this... Thanks... if code is needed just ask. thanks, Dauzy Quote Link to comment Share on other sites More sharing options...
obsidian Posted September 15, 2008 Share Posted September 15, 2008 If you want to have a link set to active but not actually change the page (keep the browser from refreshing), try something like this: document.getElementById('my-link').onclick = function() { // do any actions here return false; }; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.