Originally posted by dale_burrell
[B]Which is the better option to use when dynamically loading a page?
document.location.href = “newpage.html”
or
document.URL = “newpage.html”
My book says that Netscape depreciated document.location.href in favour of document.URL, but yahoo are using document.location.href.
Also, is there a good online reference (up-to-date) of the DOM which includes stuff like this? [/B]
It actually should be “window.location.href” or just “location.href” (the window object is always implied). You may have an old book, as “document.URL” was the one that has been deprecated.