FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » browser url with #...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: browser url with #... [message #173205 is a reply to message #173187] Sun, 27 March 2011 10:27 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Jerry Stuckle wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Twayne wrote:
>>> Vincenzo Scarpa typed:
>>> :: with this code I get the address of the browser:
>>> :: $url =
>>> :: 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
>>> ::
>>> :: but with this address:
>>> :: http://www.example.com/example.php#one
>>> ::
>>> :: the code above does not work ($url contains only 'http://
>>> :: www.example.com/example.php').
>>> ::
>>> :: How come? :(
>>> ::
>>> :: Thanks
>>> :: Vincenzo
>>>
>>> # indicates a bookmark in the document at the URL.
>>
>> It does not.
>>
>>> If there is no such bookmark, then it cannot go there and fails.
>>
>> Bookmarks have nothing to do with this; that misconception aside,
>> you are correct, but you are missing the point.
>
> Wrong again. [snip ad-hominem attack]

Bookmarks have exactly *nothing* to do with this: Using such an URL, it will
be navigated to an *anchor* in the document even if there is no
corresponding bookmark in the user's bookmarks file or folder.

"Twayne" has a misconception about what a bookmark is, and so have you.

Get informed:
- <http://en.wikipedia.org/wiki/Bookmark_(World_Wide_Web)>
- <http://en.wikipedia.org/wiki/Fragment_identifier>

"Twayne" is missing the point because the reason for the OP's problem is not
that a "bookmark" (in that wrong sense) cannot be found, but because the
fragment identifier is not part of the *request* URI (as we have already
discussed).

> And I know I'm not quoting like YOU want.

The quoting style I am *asking* (you) *for* is not different from what is
customary on Usenet and what corresponds with common sense. But I can see
how the concepts of basic politeness, of writing for one's readers, and of
common sense might be challenging to you.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to call external php script from html?
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 01:16:58 GMT 2024

Total time taken to generate the page: 0.04153 seconds