laffarsmith Posted September 10, 2010 Share Posted September 10, 2010 Ok, I've spent a good part of the day trying to figure out what is going wrong with a client site. I introduced a link within document to send readers from the blogs home page to the comments section of individual posts. It's straight forward right? HTML1, been doing these kind of links for more than ten years. #respond at the end of the normal URL in a normal anchor tag should bring the browser to id="respond" or name="respond" within the document. Right? But, a.) it doesn't. And b.) once it makes a jump everything above that point disappears. Space fills out to the same page height as if it existed but you can't scroll up. You can see it in action at http://www.thebouncingbead.com/blog/ by clicking "Add Your Comment (0)" under the title of any post. Can anyone see what might be causing this problem or experienced something similar before? Link to comment https://forums.phpfreaks.com/topic/213036-link-within-document-causing-top-of-the-page-to-disappear/ Share on other sites More sharing options...
AParson Posted September 10, 2010 Share Posted September 10, 2010 I might be wrong, but #anchor_name only works if you use "filename.extension#anchor_name" (like in "page.html#myanchorname"). Link to comment https://forums.phpfreaks.com/topic/213036-link-within-document-causing-top-of-the-page-to-disappear/#findComment-1109545 Share on other sites More sharing options...
AParson Posted September 10, 2010 Share Posted September 10, 2010 I might be wrong, but #anchor_name only works if you use "filename.extension#anchor_name" (like in "page.html#myanchorname"). Sorry, I think I just said rubbish. I checked your code, and the line where #respond is supposed to anchor might need to be changed. You have "<a name="add_response"></a>" in your code, so: 1) Change the value "add_response" for "respond" 2) Move the whole "<a name="respond"></a>" inside "<h3 id="respond">Leave a Reply</h3>" 3) Eliminate "id="respond"" from <h3 id="respond"> The result should look like this: <h3><a name="respond">Leave a Reply</a></h3> Hope it helps. Link to comment https://forums.phpfreaks.com/topic/213036-link-within-document-causing-top-of-the-page-to-disappear/#findComment-1109559 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.