Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / November 2004



Tip: Looking for answers? Try searching our database.

w3c compliant substitute for window.location

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David M. Gauntt - 27 Nov 2004 13:36 GMT
Is there a w3c compliant substitute for window.location?
I don't need the full functionality of the location
object; just the ability of getting the URL (including
the search field).

- David Gauntt
Michael Winter - 27 Nov 2004 13:46 GMT
> Is there a w3c compliant substitute for window.location?
> I don't need the full functionality of the location
> object; just the ability of getting the URL (including
> the search field).

  document.URL

allows you to retrieve the absolute address to the document as a simple  
string. IE will allow you to assign to it (and some others might, too),  
but it's defined as read-only.

Mike

Signature

Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.

Martin Honnen - 27 Nov 2004 14:07 GMT
> Is there a w3c compliant substitute for window.location?
> I don't need the full functionality of the location
> object; just the ability of getting the URL (including
> the search field).

Well the window object is not part of the W3C DOM specification, indeed
that has tried to abstract from user agents. As long as you are
scripting HTML document in browsers there is nothing wrong with using
  window
  window.document
  window.location
I don't see that as not being W3C compliant only because the W3C hasn't
had any interest to standardize that stuff.

SVG 1.2 which is more something like web application tries to
standardize a global object, see
  http://www.w3.org/TR/SVG12/api.html#GlobalObject
but I don't think that helps in any way when scripting HTML documents.

Signature

    Martin Honnen
    http://JavaScript.FAQTs.com/

Jim Ley - 28 Nov 2004 11:11 GMT
>I don't see that as not being W3C compliant only because the W3C hasn't
>had any interest to standardize that stuff.

They'll likely be a web-application working group coming along soon,
they may or may not standardise some of the legacy stuff.

Jim.
David M. Gauntt - 30 Nov 2004 18:11 GMT
It looks like I may as well keep using window.location.  I haven't run
into a browser that doesn't use it, and since document.URL is
read-only, it does't help.

Thanks for the replies!

- David Gauntt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.