Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- JavaScript location = bookmark/id on same page?


Drag_Racer - 1:11 pm on Apr 27, 2007 (gmt 0)


the reason I used window is in case of frames so not to confuse with document.URI

this is from Sun's documentation
In event handlers, you must specify window.location instead of simply using location. Due to the scoping of static objects in JavaScript, a call to location without specifying an object name is equivalent to document.location, which is a synonym for document.URL.

document.location is depresiated...

anyway, lets just shorten it all the way

window.location.hash=document.getElementById('myInput').value;


Thread source:: http://www.webmasterworld.com/javascript/3320399.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com