Forum Discussion

snaffle's avatar
snaffle
Expert
11 years ago

Retain the message id using http.request.url

Hi there,

I'm using a Page Initialization script to capture the request url for visits to the community using "http.request.url" and forwarding the information to a custom component.

The problem I'm having is that when capturing message replies, it's dropping off the message id for the replies.

So for example:

http://www.domain.com/t5/Our-stories/topic-count-in-board/m-p/515#M139

becomes:

http://www.domain.com/t5/Our-stories/topic-count-in-board/m-p/515

So it's dropping off the "#M139" which jumps the link directly to the relevant message or reply.

Does anybody know a way of capturing the url so that it doesn't lose the message id off the end, or a method for capturing the message id on it's own?

Thanks

Nathan

  • Hi snaffle 

     

    as explain here and here. you can't get the Anchors or URL fragments (#) from the server side, as the browser doesn't send whatever after "#" to the server, browser only requests what the resource without "#".

  • HaidongG's avatar
    HaidongG
    Lithium Alumni (Retired)

    Hi snaffle 

     

    as explain here and here. you can't get the Anchors or URL fragments (#) from the server side, as the browser doesn't send whatever after "#" to the server, browser only requests what the resource without "#".

    • snaffle's avatar
      snaffle
      Expert

      Thanks very much for the reply and links.

       

      It looks like I might be able to grab it using javascript which would solve my problem.