Arrowhead123 Posted January 7, 2007 Share Posted January 7, 2007 I tried linking within a document. <a href="link.php#mark">click here</a>... <a href="mark"></a> When I do this for a page I created called link.php, the page doesn't move at all. It doesn't go to "mark". I tried the other way, where I put only "#mark" under a href, but then it goes under mydomain.com/#mark. It seems that it doesn't quite recognize the # for in page links. Has anyone else had this problem? How do I solve it? Many Thanks, Andrew Link to comment Share on other sites More sharing options...
Arrowhead123 Posted January 7, 2007 Author Share Posted January 7, 2007 Bump! I tried linking within a document.When I do this for a page I created called link.php, the page doesn't move at all. It doesn't go to "mark". I tried the other way, where I put only "#mark" under a href, but then it goes under mydomain.com/#mark. It seems that it doesn't quite recognize the # for in page links. Has anyone else had this problem? How do I solve it? Many Thanks, Andrew Link to comment Share on other sites More sharing options...
Arrowhead123 Posted January 8, 2007 Author Share Posted January 8, 2007 Has no one had this problem before?? Link to comment Share on other sites More sharing options...
jonquil Posted January 8, 2007 Share Posted January 8, 2007 Yes, of course. I asked the same question but received no response. Here's what I have learned. Bookmarks will not function on a page that must be refreshed because it has dynamic content. It will work with a static page, like privacy.php. I can not explain it further than that nor do I understand why it can't be done. Link to similar thread: http://www.oscommerce.com/forums/index.php?sho...=179476&hl= jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 8, 2007 Share Posted January 8, 2007 When you add the # symbol, it tells the code to link to the anchor that has that name. So you have to create that with <a name="mark">Mark</a> Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
jonquil Posted January 8, 2007 Share Posted January 8, 2007 Yes, of course. I asked the same question but received no response. Here's what I have learned. Bookmarks will not function on a page that must be refreshed because it has dynamic content. It will work with a static page, like privacy.php. I can not explain it further than that nor do I understand why it can't be done. Link to similar thread: http://www.oscommerce.com/forums/index.php?sho...=179476&hl= jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 8, 2007 Share Posted January 8, 2007 No, that is not correct. I have added such links to the next version of the Header Tags contribution (not released yet). Here is a variation of the code I use <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . 'anchor' . '">' . 'anchor' ?></a></td> The above will link to an anchor named "anchor." Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Arrowhead123 Posted January 8, 2007 Author Share Posted January 8, 2007 Thanks for the help guys. Unfortunately, none of them have worked. I tried using the php code you used below, but it seems that that is the exact same thing I'm doing. The only difference is that you're prepending some information about a product to the actual anchor code. In fact, I don't think the code is right because you leave a space between the # and the 'anchor', so it looks like # anchor instead of #anchor. Any other suggestions? No, that is not correct. I have added such links to the next version of the Header Tags contribution (not released yet). Here is a variation of the code I use<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . 'anchor' . '">' . 'anchor' ?></a></td> The above will link to an anchor named "anchor." Jack Link to comment Share on other sites More sharing options...
jonquil Posted January 8, 2007 Share Posted January 8, 2007 No, that is not correct. I have added such links to the next version of the Header Tags contribution (not released yet). Here is a variation of the code I use<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . 'anchor' . '">' . 'anchor' ?></a></td> The above will link to an anchor named "anchor." Jack Jack, do you have any examples so we can see this in action? :) jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 9, 2007 Share Posted January 9, 2007 I can't post it here due to forum rules but I will PM you a link. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.