I have many backlinks to page.php, I can't edit all those other pages to link to page.php#text Is there a way to add #text in the end of the URL if the page is visited? I need to make the page scroll to a certain spot. Thanks!
Hi x0x, here is some code to do what you want.. <script type="text/javascript"> function jumptoanchor( anchor ) { document.location='#'+anchor; } </script> HTML: this function takes as its single parameter the name of the anchor you have set in your page, and when invoked it will scroll to it. (just as if you had clicked on a link pointing there..) so add an anchor to your page like <a name="sectiontoshow">some text</a> HTML: and then call the function as <body onload="jumptoanchor('sectiontoshow')"> HTML: (this is the simplified way to call it ... for more complex sites that other things happen on the onload event there are more correct ways to call the function..) hope this helps..