wood burning stoves 2.0*
The moose likes Ranch Office and the fly likes Link to a single post Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "Link to a single post" Watch "Link to a single post" New topic
Author

Link to a single post

Bob Wheeler
Ranch Hand

Joined: Apr 24, 2009
Posts: 317
Hi Rancher,

is it possible to refer to a single post? Sometimes that would be useful. I know there is a number attached to each post,
which you can also see in the link (left of "posted Monday bla bla"). But if you click it on it you get only to the top of the thread.
So is is just not working (for me only?) or is it not planned at all.

Thanks
Bob


SCJP 6 - SCJD - SCWCD 5 - SCBCD 5
JavaEnterpriseEditionFaq - TomcatFaq
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
I know there is a number attached to each post, which you can also see in the link (left of "posted Monday bla bla"). But if you click it on it you get only to the top of the thread.

This does work fine for me (and, based on the lack of bug reports around this, presumably for others as well). E.g., does http://www.coderanch.com/t/423549/Product-Other-Certifications/certification/Spring-Certification#2007552 not take you to the last post of that topic?


Ping & DNS - my free Android networking tools app
Bob Wheeler
Ranch Hand

Joined: Apr 24, 2009
Posts: 317
Ulf Dittmer wrote:
I know there is a number attached to each post, which you can also see in the link (left of "posted Monday bla bla"). But if you click it on it you get only to the top of the thread.

This does work fine for me (and, based on the lack of bug reports around this, presumably for others as well). E.g., does http://www.coderanch.com/t/423549/Product-Other-Certifications/certification/Spring-Certification#2007552 not take you to the last post of that topic?

No. Doesn't work; tested on Firefox (3.0) and IE (7.0). All running on WinXP Prof.
Not my homesystem. I can check it later on Ubuntu.

cheers
Bob
Bob Wheeler
Ranch Hand

Joined: Apr 24, 2009
Posts: 317
Just for information:
I checked my error console (Firefox) and got some error messages of this and other form:
Security Error: Content at http://googleads.g.doubleclick.net/ may not load data from...

Always http://googleads.g.doubleclick.net/ is part of. If I turn JavaScript off, they are gone.
Maybe that's part of the problem described above. Don't know. Just for information.

cheers
Bob
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Works fine for me in Firefox 3.0.11 running with NoScript turned on and in IE7 (also running on Win XP Professional). It doesn't use script - its using a fragment identifier to do it.

Must be something peculiar about your set up. User agents are supposed to give up trying to resolve fragment identifiers if the user agent has stopped parsing - do you have any plug-ins or extension on your browsers that might cause this?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3029
    
  35

Bob Wheeler wrote:
Ulf Dittmer wrote:
I know there is a number attached to each post, which you can also see in the link (left of "posted Monday bla bla"). But if you click it on it you get only to the top of the thread.

This does work fine for me (and, based on the lack of bug reports around this, presumably for others as well). E.g., does http://www.coderanch.com/t/423549/Product-Other-Certifications/certification/Spring-Certification#2007552 not take you to the last post of that topic?

No. Doesn't work;


It doesn't work for me too. I found that there are no label given for the id "2007552" in that page, so it may be the problem. But there IS a label given for "post_text_2007552", so the following URL works fine for me:

http://www.coderanch.com/t/423549/Product-Other-Certifications/certification/Spring-Certification#post_text_2007552

I think that the cell id format which containing the message should be changed. For this example "post_text_2007552" should be changed for "2007552".


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The source already contains a div element with the id 2007552.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3029
    
  35

Paul Sturrock wrote:The source already contains a div element with the id 2007552.


Mmmm, is this the thing you are talking about?

It is not supposed to do that.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
No, Paul is talking about <div class="edit_area" id="2007552">.

What should really be there is something like <a name="2007552">. I never knew that the hash notation worked for IDs at all.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

No. I'm talking about the div tag with the id specified above:

Which is a child of the element you mention in your first post.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Ulf Dittmer wrote:No, Paul is talking about <div class="edit_area" id="2007552">.

What should really be there is something like <a name="2007552">. I never knew that the hash notation worked for IDs at all.


It's HTML 5, so newish (only found that out myself a few months ago ).
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3029
    
  35

Paul Sturrock wrote:The source already contains a div element with the id 2007552.

I couldn't see any div tag with id element in the source. I think that the JSP renders that div tag only for those who have bartender or higher privileges, that is why it works fine for you and Ulf.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You may be onto something. I get the same behaviour when I log out then click the link. Looks like a little bug after all.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3029
    
  35

Strange! I couldn't find that tag, even after logging out.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

...I mean the same behaviour as you are seeing.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3029
    
  35

A privileged bug
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
OK, we're going to have proper <a name="..."> tags for all visitors in the next release of the forum software; that should presumably work in all browsers.
Bob Wheeler
Ranch Hand

Joined: Apr 24, 2009
Posts: 317
Ulf Dittmer wrote:OK, we're going to have proper <a name="..."> tags for all visitors in the next release of the forum software; that should presumably work in all browsers.

Would be enough to give me bartender privileges.

cheers and thanks
Bob
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38108
    
  22
Bob Wheeler wrote:Would be enough to give me bartender privileges.
You mean bartender responsibilities?
Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 3003
    
    9
How about free beer, at least?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
This should now work for everybody.
Pushkar Choudhary
Rancher

Joined: May 21, 2006
Posts: 425

Ulf Dittmer wrote:This should now work for everybody.


Yes. It is now working fine in my system. Checked with Firefox 3.5.

Thanks Ulf.


-Pushkar
Bob Wheeler
Ranch Hand

Joined: Apr 24, 2009
Posts: 317
Ulf Dittmer wrote:This should now work for everybody.

Thanks a lot. It's working like a new oiled machine.

cheers
Bob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
There fancy quotes and code blocks on the page that changes sizes and causes the location of the link to be off.

We might need some JS magic in there.

Eric
 
wood burning stoves
 
subject: Link to a single post
 
Similar Threads
Are Javaranch sherifs too strict on this forum ?
How much control on the servlet ?
class name in choices.txt
using printf within println?
a FRIENDLY place, dammit!