473,490 Members | 2,488 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

w3c compliant substitute for window.location

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
Jul 23 '05 #1
4 2074
On 27 Nov 2004 05:36:35 -0800, David M. Gauntt <dm**********@yahoo.com>
wrote:
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

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #2


David M. Gauntt wrote:
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #3
On Sat, 27 Nov 2004 15:07:31 +0100, Martin Honnen <ma*******@yahoo.de>
wrote:
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.
Jul 23 '05 #4
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
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
50362
by: saiho.yuen | last post by:
Hi, Is anyone know what is the difference between Location.href and Window.location.href Thanks you very much:) Saiho
19
30992
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
3
22963
by: Christian Hubinger | last post by:
Hi! I'm working on a page that uses javascript very much. My problem is now that i cannot redirect to another page in IE with window.location =<URL>; This command gets executed (proofed with...
70
6168
by: Ben Pfaff | last post by:
One issue that comes up fairly often around here is the poor quality of the pseudo-random number generators supplied with many C implementations. As a result, we have to recommend things like...
2
23478
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
8
2461
by: johnsonholding | last post by:
Here is the code for a pop-up window that works in Firefox and not in IE - I get a java error or something, Here is the code : </script> <SCRIPT language="JavaScript"...
18
3299
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
5
12854
by: soni2926 | last post by:
Hi, I have a pop up window, that window needs to refresh the parent window when opened, I'm doing the following: window.opener.location.href(window.opener.location.href); problem I'm having...
6
2309
mikewagan
by: mikewagan | last post by:
hello guys, Javascript's been bugging on IE, and i'm trying to search for a solution for this answer but no luck. I have a select box as a navigation element. If a user clicks on an option, it...
0
7108
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
618
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.