I agree with you eTully, JS doesnt have complete read/write access to the adressbar (if something does), and it does have read access, and some "write" capabilities (you can replace, or retrieve, operate, then resend, stuff like that).
But Mark, as far as I understand, I would disagree with you.
MarkR wrote: "Javascript can read the location of the current document, nothing more and nothing less"..."therefore Javascript CANNOT, in the general case, read what's in the address bar."
As you said, in the address bar you can find:
$SERVER['HTTP_HOST'], $SERVER['SCRIPT_NAME'], $SERVER['PATH_INFO'], $SERVER['QUERY_STRING'] and a Hash (value after #, yeah "the fragment part").
That would be something like: http://www.domain.com/path/file.php?v1=u1&v2=u2#hash
(the http_host is more complex than just the "http://", but you do get some info about it on the adress bar's text)
Sure JS can read the location (including post vars and hash), is there anything more to read in the address bar?
"window.location.href" returns the first 4 (http, script, path, query), packed up in a whole string, as you should know. (You can even retrieve the post vars with javascript. (see )
On the other hand, "document.location.hash" is the hash object ("the fragment part"), which regulary indicates anchors within html documents, but can be used to send data via http (see, script in here).
If you understand the concept of dynamic content you should know the location includes where the document/program is, and both the actual state of vars, and also the hash which indicates a part of the html.
Anyway, there should be plenty of exceptions (from which I would like to see an example of) where the location is different from the content of the adress bar, which in general cases CAN be read by JavaScript, and if I take your word, even better than most server-side languages; because they don't recieve "the fragment part".
The way I think of it: they should work together to get things done.