By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,705 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,705 IT Pros & Developers. It's quick & easy.

window.location and document.location

dmjpro
100+
P: 2,476
can anyone differ between window.location and document.location?????????????


thanx in advance
Feb 13 '07 #1
Share this Question
Share on Google+
3 Replies

acoder
Expert Mod 15k+
P: 16,027
See this page:
document.location was originally a read-only property, although Gecko browsers allow you to assign to it as well. For cross-browser safety, use window.location instead.
Feb 13 '07 #2

100+
P: 428
document.location has been changed to document.URL,
though both are supported by most browsers.
window.location returns an object,
document.URL or document.location returns a read only string.

You can't change the document.URL, but you can change the window location.
The window.location.href property is the same as the document.URL unless there was a server redirect.
Feb 13 '07 #3

dmjpro
100+
P: 2,476
thanx for ur reply ....................
Feb 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.