the url is like this: http://www.domain.com/page/pagename:#1 book
actually, pagename is a parameter and "#1 book" doesn't go into the $pagename. Is there a way?
parameter and anchor tag
Moderator: General Moderators
Re: parameter and anchor tag
No, there isn't. Not directly.
It can be done with JavaScript but that's not something you should consider trying.
It can be done with JavaScript but that's not something you should consider trying.
Re: parameter and anchor tag
hmm!
so there's no way?
yes, i found that it can be done with JS and i dont wanna use JS to read that param.
change the value before posting to url?
so there's no way?
yes, i found that it can be done with JS and i dont wanna use JS to read that param.
change the value before posting to url?
Re: parameter and anchor tag
When the browser asks your server for the page it doesn't tell it what the anchor/hash is. The browser literally asks for "/page/pagename:". When it gets the page back it looks for the "1 book" anchor and (if found) scrolls to it.nay369 wrote:hmm!
so there's no way?
Since PHP works on the server, and the server doesn't know about the anchor, PHP won't know about it either.