Forum Moderators: open

Message Too Old, No Replies

Create a link to a section on another page you're not the author of

         

matteusmauritz

4:42 pm on Jan 4, 2009 (gmt 0)

10+ Year Member



Let's say I have a blog and let's say I have read something interesting in an article in New York Times. The article is 3000+ words long, so what I would like to do is to create a link that points to the specific section in the article. Is this possible?

tedster

9:21 pm on Jan 4, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums!

As you probably already know, you cannot link to a "page fragement identifier" (#) if the original author doesn't already have one where you want it. If you're willing to open a new window with javascript, however, you could use the js scrollTo() method to bring the right section into the viewport for most users.

matteusmauritz

7:54 am on Jan 5, 2009 (gmt 0)

10+ Year Member



Sweeet... That was actually exactly what I wanted. One question though, this new window, is that a "proper" new window, or does it in some way "cut out" the article or maybe even the specific text passage and present it in like a plain HTML version, like the HTML version Google makes of PDF-files? Because then there will be copyright issues.

But if it is possible I assume that the proper new window is the "default" or the easiest solution, and if so my problems are solved.

This is so sweet... I'm going to get so rich.

Thank you Tedster!

tedster

9:02 am on Jan 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The javascript window.open() method just opens the url that you point it to - it doesn't "steal" anything or make it part of a url on your site.

Jordi_Gran

7:08 pm on Jan 10, 2009 (gmt 0)

10+ Year Member



Tedster,

Could you even point to an id, name or value around if there is any?

Will scrollTo() not work in all cases? (you said = for most users)

Thanks

tedster

7:10 pm on Jan 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Some users will have javascript turned off - that's why I said "most users". I've never tried pointing to a name or id, but it sounds like it's worth testing.