The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Jump to certain text on a page, I cannot edit the destination page.
Jon Jacobs
post Aug 10 2020, 10:15 PM
Post #1





Group: Members
Posts: 4
Joined: 22-December 18
Member No.: 26,781



On my Web page I have this link to one of my books on Amazon:
<p style="font-size:28px"><a href="https://www.amazon.com/gp/product/B07D252T9L/ref=dbs_a_def_rwt_hsch_vapi_tkin_p1_i0">The Republic (Customer Reveiews)</a></p>

The link works, but I do not want the person to land at the top of the page.

Finding the place where readers can read or input a review of the book they have read is not easy. I want my link to take the person right to the place on the page where there is an <h2> that says "Customer reviews"
Since I cannot edit the actual Amazon page, I cannot insert a # tag. So I need a way to jump to text instead. How do I modify my link to accomplish this?

Thank you
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 11 2020, 01:55 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



https://www.amazon.com/gp/product/B07D252T9...customerReviews

If this can be done depends on if there are any suitable "anchor points" in the page you want to link to a specific point in. In this case there was one that worked. View source and search for id=. In legacy pages it can also be name=.

The FAQ is old and describes how to create and use such an anchor point with name. But now we use id and we can use it with any element, not only A. But the principle is the same. You need that anchor point and then you link to it by adding #nameOfAnchor at the end of the URL to the page. Just as with this link to that section of the FAQ.

https://htmlhelp.com/faq/html/links.html#named-anchor
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 11 2020, 03:41 AM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Darn. I didn't stay long enough on the page. Amazon does some trickery that makes the page jump to the top again, after first having landed where we want... How stupid of them.

Sorry, that we can't do anything about. sad.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Jon Jacobs
post Aug 11 2020, 08:09 AM
Post #4





Group: Members
Posts: 4
Joined: 22-December 18
Member No.: 26,781



QUOTE(pandy @ Aug 11 2020, 03:41 AM) *

Darn. I didn't stay long enough on the page. Amazon does some trickery that makes the page jump to the top again, after first having landed where we want... How stupid of them.

Sorry, that we can't do anything about. sad.gif

Actually you did help me use a better search of the source I captured and found this in the page:
<div id="reviewsMedley" data-hook="reviews-medley-widget"
I put #reviewsMedley at the end of my href and it worked!

I didn't see a way to "mark as answer" or otherwise give credit, but you helped me stumble onto the answer, and I thank you.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 11 2020, 08:37 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Hah! Odd that they only scroll the page to top sometimes. But good you found a away.

No, we don't have those things here. happy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 03:32 AM