virtualadz Posted June 21, 2006 Share Posted June 21, 2006 i think i will need to start all over agian with what is HTML? i dont know what's wrong with this i set up a anchor link, but no it wont work, in anywayi have used<a href="#text">Text</a><a name="text">Text</a>the above doesn't work, takes me to the homepage of my site<a href="http://www.site.com/somepage.php#text">Text</a><a name="Text">Text</a>the above too doesn't work, this refreshes the page and them comes to required anchor link.can't a php page handle anchor links i try this on an html page and t works, these small thinsg will eat my brain out. any suggestions?? Link to comment Share on other sites More sharing options...
aspnetguy Posted June 21, 2006 Share Posted June 21, 2006 this works <html><head> <title>...</title></head><body><a href="#btm">Bottom</a><div style="height:1000px"></div><a name="btm">btm</a></body></html> Link to comment Share on other sites More sharing options...
The Praetorian Posted June 21, 2006 Share Posted June 21, 2006 Are you on a paid server? Or a free one? If it's free, the php most likely won't work.As for your code, the proper syntax is as follows.<a href="page.php#name">Link</a><a name="name">Text</a> Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 i said it works for me on an html page. Link to comment Share on other sites More sharing options...
The Praetorian Posted June 21, 2006 Share Posted June 21, 2006 aspnetguy's will probably work too. The one I put up is just the one I use on my site. And I title the document as .php. So. Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 edit: i didn't see you reply , post #4 was for aspnetguy,i am on a paid server.the way you mentioned is correct but mine is not wrong either. but set them all apart. i said in post #1 that it refreshes the page if it's your first visit. so th codee you gave or this<a href="http://www.site.com/somepage.php#text">Text</a>refeshes that page and then takes me to the anchor link Link to comment Share on other sites More sharing options...
The Praetorian Posted June 21, 2006 Share Posted June 21, 2006 Right. The second way you put it was right, the first way (#text) wasn't. That's the one I was correcting, in case that was the problem. But since you figured it out... woot.Although I still don't understand how that works in an html document. I thought php couldn't work in a .html? Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 Right. The second way you put it was right, the first way (#text) wasn't. That's the one I was correcting, in case that was the problem. But since you figured it out... woot.Although I still don't understand how that works in an html document. I thought php couldn't work in a .html?<{POST_SNAPBACK}> i didn't say i figured it out i still nned help, i told you that i if i use my 2nd method or your method , then the page refreshes itself and then comes to the anchor link. who wants to refresh the page. what to do now??? Link to comment Share on other sites More sharing options...
The Praetorian Posted June 21, 2006 Share Posted June 21, 2006 Hm. It refreshes the page? I'm not really sure about that. Mine doesn't do that. Like I said, I use my code exactly the way I wrote it above, and I title the document a .php , not an .html. Can you post a link to the page that's giving you a problem please? Link to comment Share on other sites More sharing options...
aspnetguy Posted June 21, 2006 Share Posted June 21, 2006 can you post the code for the whole page?whether it is in a .html or .php the code I gave will work. Do you mean you are echoing the html code for the anchors?This guessing game isn't working Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 Hm. It refreshes the page? I'm not really sure about that. Mine doesn't do that. Like I said, I use my code exactly the way I wrote it above, and I title the document a .php , not an .html. Can you post a link to the page that's giving you a problem please?yes, now yu guess it right bhuratea.com/faq.phpplease note one thing:after clicking on the anchor the page refreshes if it's your first visit to that page i.e. until you close the window or open it in a new window, the anchor links work as redquired as long as you surf on the same window.also note only a TITLE named Order has an anchor link for now to a text Order lower on the page. thanks Link to comment Share on other sites More sharing options...
aspnetguy Posted June 21, 2006 Share Posted June 21, 2006 ahhhh??? I hate to tell you this but it works fine for me in FF anf IE Link to comment Share on other sites More sharing options...
The Praetorian Posted June 21, 2006 Share Posted June 21, 2006 Okay, even on my first visit, the page didn't refresh when I clicked the Order link. It simply auto-scrolled to the appropriate section. Seems to work fine from where I'm sitting... but I'm also on a high-speed connection. So it's possible that it's refreshing too fast for me to make out. Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 even with your first visit Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 i tested it with both IE and FF, and with Dialup and broadband. still not getting it right?? Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 ok, i will check it tonight i all my computers, but now i have made it<a href="#text">Text</a><a name="text">text</a>does this work on your side, or takes you to the homepage or refreshes it Link to comment Share on other sites More sharing options...
pulpfiction Posted June 21, 2006 Share Posted June 21, 2006 I tried this page in IE bhuratea.com/faq.php.. It goes to home page..When you hover over the links say "How do I order?" the URL in the status bar is http://bhuratea.com/#how_order. this will take you to the homw page. why not try <a href="/faq.php#text">Text</a><a name="text">text</a>i'm not sure if this will work, just try... Link to comment Share on other sites More sharing options...
aspnetguy Posted June 21, 2006 Share Posted June 21, 2006 it is no longer workling for me...it is as pulpfiction said. Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 i am gonna explain it in more details: pardon for writing again, but i was myslef confused with itwhat do i need: an anchor link. what's the problem and with what:1. with <a href="#text">Text</a> <a name="#text">Text</a> error: takes the user to the homepage, with url as, bhuratea.com/#text where does it work: on my pc in an html page, this works.2. with <a href="page.php#text">Text</a> <a name="text">Text</a>these 2 more or less are the same <a href="http://www.bhuratea.com/page.php#text">Text</a> <a name="text">Text</a> error: i do not see it working on my end , people here do.what's my source code: thus <?php/* $Id: faq.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $*/define('NAVBAR_TITLE', 'FAQ');define('HEADING_TITLE', 'FAQ');define('TEXT_INFORMATION', 'We have put together an extensive list of the Frequently Asked Questions (FAQ), by our customers.<br><br><strong><a href="#order">Order</a></strong><br><a href="#how_order">How do I order?</a><br><a href="#gift">How can I purchase a Gift Voucher?</a><br><a href="#minimum">Do you have any Minimum Order Quantity?</a><br><a href="#safety">Is it safe to disclose my financial details on Bhuratea.com?</a><br><br><strong><a href="#billing">Billing</a></strong><br><a href="#payments">What type of payments do you accept?</a><br><a href="#samples">Do you provide free samples?</a><br><br><strong><a href="#shipping">Shipping</a></strong><br><a href="#country">Do you ship to my country?</a><br><a href="#cost">How much does shipping cost?</a><br><a href="#time">How long will my tea take to get to me?</a><br><br><strong><a href="#misc">Misc.</a></strong><br><a href="#support">How do I contact you incase I need any support?</a><br><a href="#returns">Under what cases can I return your product/s?</a><br><a href="#wholesale">How can I order large quantities of tea?</a><br><br><hr><h3><a name="order">Order</a></h3><strong><a name="how_order">How do I order?</a></strong><br>You need to first choose the products you wish to buy, then add them to cart, the details of which will be shown on your left. You may then continue shopping on BhuraTea.com, or proceed to checkout by clicking on the link present on the top right corner of every page.<br><br><strong><a name="gift">How can I purchase a Gift Voucher?</a></strong><br>A gift voucher can be purchased in the same way you purchase a product. You will be then sent an email with details in it. Please also read our <a href="' . tep_href_link(FILENAME_GV_FAQ) . '"><u>Gift Voucher FAQ</u></a>.<br><br><strong><a name="minimum">Do you have any Minimum Order Quantity?</a></strong><br>No, we do not have a Minimum Order Quantity, purchase as much as you wish.<br><br><strong><a name="safety">Is it safe to disclose my financial details on Bhuratea.com?</a></strong><br>Yes, it is absolutely safe to disclose your financial details on Bhuratea.com, please take some time to read our <a href="' . tep_href_link(FILENAME_CONDITIONS) . '"><u>Terms & Legals</u></a> and <a href="' . tep_href_link(FILENAME_PRIVACY) . '"><u>Privacy Policy</u></a>.<hr><h3><a name="billing">Billing</a></h3><strong><a name="payments">What type of payments do you accept?</a></strong><br>We accept payments by Paypal, Cheque/Direct Deopsit (Indians only), Wire Transfer, Western Union Money Transfer. Please visit our <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><u>payments page</u></a> for more info on this.<br><br><strong><a name="samples">Do you provide free samples?</a></strong><br>No, currently we do not provide free samples.<hr><h3><a name="shipping">Shipping</a></h3><strong><a name="country">Do you ship to my country?</a></strong><br>We ship to USA and all countries under Europe.<br><br><strong><a name="cost">How much does shipping cost?</a></strong><br>Please visit our <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><u>shippings page</u></a> for more info on this.<br><br><strong><a name="time">How long will my tea take to get to me?</a></strong><br>Usually our tea products will reach you within 15 days, based on your location the delivery period may differ. Also have a look at our <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><u>shippings page</u></a>.<hr><h3><a name="misc">Misc.</a></h3><strong><a name="support">How do I contact you incase I need any support?</a></strong><br>We love to hear from you, please write to us at: info@bhuratea.com, or use our online email form: <a href="' . tep_href_link(FILENAME_CONTACT_US) . '"><u>contact us</u></a>, we will be glad to respond to your concerns/suggestions.<br><br><strong><a name="returns">Under what cases can I return your product/s?</a></strong><br>It depends on certain factors, please visit our <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><u>returns page</u></a> for more info on this.<br><br><strong><a name="wholesale">How can I order large quantities of tea?</a></strong><br>Please use our online mail form to make a <a href="' . tep_href_link(FILENAME_WHOLESALE) . '"><u>wholesale inquiry</u></a>.<hr>');?> Link to comment Share on other sites More sharing options...
The Praetorian Posted June 21, 2006 Share Posted June 21, 2006 Okay, as I said before, when referencing the links, you have to write it like this <a href="file.php(or html)#name"> To my knowledge, just using #name is not sufficient. Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 althout i have changed it now to<a href="faq.php#order">Text</a><a name="order">Text</a>but i have seen a bunch of other sites, using only<a href="#text">text</a>also on my first visit to this page (i.e. opening the site in a new window), i still see the page being refreshed and them i am brought to the anchor links. Link to comment Share on other sites More sharing options...
Little Goat Posted June 21, 2006 Share Posted June 21, 2006 It works fine in opera right now. Link to comment Share on other sites More sharing options...
The Praetorian Posted June 21, 2006 Share Posted June 21, 2006 Are you opening the page straight to www.yourdomain.com/page.php#name? Because if you are, it's going to auto scroll and refresh no matter what you do. Link to comment Share on other sites More sharing options...
virtualadz Posted June 21, 2006 Author Share Posted June 21, 2006 no, my url is what you said , <a href="faq.php#tetx">Text</a> <?php/* $Id: faq.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $*/define('NAVBAR_TITLE', 'FAQ');define('HEADING_TITLE', 'FAQ');define('TEXT_INFORMATION', 'We have put together an extensive list of the Frequently Asked Questions (FAQ), by our customers.<br><br><strong><a href="faq.php#order">Order</a></strong><br><a href="faq.php#how_order">How do I order?</a><br><a href="faq.php#gift">How can I purchase a Gift Voucher?</a><br><a href="faq.php#minimum">Do you have any Minimum Order Quantity?</a><br><a href="faq.php#safety">Is it safe to disclose my financial details on Bhuratea.com?</a><br><br><strong><a href="faq.php#billing">Billing</a></strong><br><a href="faq.php#payments">What type of payments do you accept?</a><br><a href="faq.php#samples">Do you provide free samples?</a><br><br><strong><a href="faq.php#shipping">Shipping</a></strong><br><a href="faq.php#country">Do you ship to my country?</a><br><a href="faq.php#cost">How much does shipping cost?</a><br><a href="faq.php#time">How long will my tea take to get to me?</a><br><br><strong><a href="faq.php#misc">Misc.</a></strong><br><a href="faq.php#support">How do I contact you incase I need any support?</a><br><a href="faq.php#returns">Under what cases can I return your product/s?</a><br><a href="faq.php#wholesale">How can I order large quantities of tea?</a><br><br><hr><h3><a name="order">Order</a></h3><strong><a name="how_order">How do I order?</a></strong><br>You need to first choose the products you wish to buy, then add them to cart, the details of which will be shown on your left. You may then continue shopping on BhuraTea.com, or proceed to checkout by clicking on the link present on the top right corner of every page.<br><br><strong><a name="gift">How can I purchase a Gift Voucher?</a></strong><br>A gift voucher can be purchased in the same way you purchase a product. You will be then sent an email with details in it. Please also read our <a href="' . tep_href_link(FILENAME_GV_FAQ) . '"><u>Gift Voucher FAQ</u></a>.<br><br><strong><a name="minimum">Do you have any Minimum Order Quantity?</a></strong><br>No, we do not have a Minimum Order Quantity, purchase as much as you wish.<br><br><strong><a name="safety">Is it safe to disclose my financial details on Bhuratea.com?</a></strong><br>Yes, it is absolutely safe to disclose your financial details on Bhuratea.com, please take some time to read our <a href="' . tep_href_link(FILENAME_CONDITIONS) . '"><u>Terms & Legals</u></a> and <a href="' . tep_href_link(FILENAME_PRIVACY) . '"><u>Privacy Policy</u></a>.<hr><h3><a name="billing">Billing</a></h3><strong><a name="payments">What type of payments do you accept?</a></strong><br>We accept payments by Paypal, Cheque/Direct Deopsit (Indians only), Wire Transfer, Western Union Money Transfer. Please visit our <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><u>payments page</u></a> for more info on this.<br><br><strong><a name="samples">Do you provide free samples?</a></strong><br>No, currently we do not provide free samples.<hr><h3><a name="shipping">Shipping</a></h3><strong><a name="country">Do you ship to my country?</a></strong><br>We ship to USA and all countries under Europe.<br><br><strong><a name="cost">How much does shipping cost?</a></strong><br>Please visit our <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><u>shippings page</u></a> for more info on this.<br><br><strong><a name="time">How long will my tea take to get to me?</a></strong><br>Usually our tea products will reach you within 15 days, based on your location the delivery period may differ. Also have a look at our <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><u>shippings page</u></a>.<hr><h3><a name="misc">Misc.</a></h3><strong><a name="support">How do I contact you incase I need any support?</a></strong><br>We love to hear from you, please write to us at: info@bhuratea.com, or use our online email form: <a href="' . tep_href_link(FILENAME_CONTACT_US) . '"><u>contact us</u></a>, we will be glad to respond to your concerns/suggestions.<br><br><strong><a name="returns">Under what cases can I return your product/s?</a></strong><br>It depends on certain factors, please visit our <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><u>returns page</u></a> for more info on this.<br><br><strong><a name="wholesale">How can I order large quantities of tea?</a></strong><br>Please use our online mail form to make a <a href="' . tep_href_link(FILENAME_WHOLESALE) . '"><u>wholesale inquiry</u></a>.<hr>');?> i was able to take a screen shot,here you will see that my mouse is over how to order (it's color ha changed ) and in the staus bar, you will see the urlhttp://bhuratea.com/faq.php#how_order.phpin the progress bar,you will see the page being opened. but when i click it after my first visit, it''s alright. Link to comment Share on other sites More sharing options...
aspnetguy Posted June 21, 2006 Share Posted June 21, 2006 it is working now...btw you should remove that screen shot it is 2.3Mb that will take a dialup user almost 10 minutes to download just hte screen shot. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now