So here is a sample of my code:
It works....good news.HTML Code:<script language='javascript'> function changeMenu(id) { if(id == "a") { document.getElementById('a').style.display = "block"; document.getElementById('b').style.display = "none"; document.getElementById('c').style.display = "none"; } if(id == "b") { document.getElementById('a').style.display = "none"; document.getElementById('b').style.display = "block"; document.getElementById('c').style.display = "none"; } if(id == "c") { document.getElementById('a').style.display = "none"; document.getElementById('b').style.display = "none"; document.getElementById('c').style.display = "block"; } } </script> <a href='javascript:;' onClick="changeMenu('a');">A</a> <a href='javascript:;' onClick="changeMenu('b');">B</a> <a href='javascript:;' onClick="changeMenu('c');">C</a> <div id='a' style='display:none;'>this text shows when you click on a</div> <div id='b' style='display:none;'>this text shows when you click on a</div> <div id='c' style='display:none;'>this text shows when you click on c</div>
Anyway, the problem is, what if I want to link to a certain div.
For example, the link automatically take it so that it shows the div, without them having to click the A link on the webpage.
If you don't know what I am asking, please say so, so that I can clear it up.
Thanks!



Reply With Quote


Bookmarks