westkoast Posted February 21, 2003 Share Posted February 21, 2003 Basially, our policies page is very long, and we wanted to put some links at the top of the document that would automatically scroll down to the anchored part of the page.... In html it worked fine, but now that the pages are all php...for some reason it doesn't work anymore... Any suggestions? I need to read the rules more often... Link to comment Share on other sites More sharing options...
Daemonj Posted February 22, 2003 Share Posted February 22, 2003 The PHP should not have any effect on that because by the time the page gets to the browser, the PHP has been parsed and the entire document is HTML. Check that you have the proper names and ids in your links and matching entries in your anchor tags. "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein Link to comment Share on other sites More sharing options...
patm Posted February 22, 2003 Share Posted February 22, 2003 Daemonj said it. Check that your quotes are escaped - you may have to put a backslash in front of any quotes or double quotes ( this will depend whether php is echoing a double or single quoted string). Have a look at the source code of your page, and see what the tags look like, you may need to put " instead of ". Link to comment Share on other sites More sharing options...
Paul_w Posted February 22, 2003 Share Posted February 22, 2003 I found this problem too, it is caused by the use of a <base href=".....> tag being added to the code of most osC pages, so when you click on the anchor link you have defined for example '#pagetop' it takes you to the url defined in the base href with the '#pagetop' tacked to the end. The way I managed to get this working was to use the following code for my link to the anchor: <a href="<?php echo $PHP_SELF."?".$QUERY_STRING; ?>#pagetop">Top of page</a> This may not work with all server configurations though! HTH - Paul Link to comment Share on other sites More sharing options...
naiadomare Posted April 10, 2008 Share Posted April 10, 2008 That works PERFECTLY!! Thank you It was a rather fundamental issue I was having with the navigation system I'm putting on the shop and you just solved it for me. Regards. Link to comment Share on other sites More sharing options...
♥FWR Media Posted April 10, 2008 Share Posted April 10, 2008 I like to use <a href="test.php?this=rubbish&#sec5">Section 1 - About this Document</a> <div id="sec1"></div> <div id="sec2"></div> <div id="sec3"></div> <div id="sec4"></div> <div id="sec5"></div> Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.