location object not found

VERIFIED FIXED

Status

()

Core
JavaScript Engine
P2
normal
VERIFIED FIXED
20 years ago
17 years ago

People

(Reporter: John G. Myers, Assigned: vidur (gone))

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

20 years ago
Running 'viewer', the following javascript generates the error:

JavaScript error: location is not defined

if (location.search)
    user = location.search.substring(6, location.search.length)

Updated

20 years ago
Assignee: mccabe → vidur

Comment 1

20 years ago
Looks like a DOM omission.

I see 'Document Object Model' in the mozilla modules page, but not in the
components list.  Does the bugsplat modules list need a revision?

Comment 2

20 years ago
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser

Comment 3

20 years ago
DOM bugs are not my problem.

Updated

20 years ago
QA Contact: 4015 → 4616

Comment 4

20 years ago
QA contact re-assigned according to the product areas we're currently working
on.
(Assignee)

Updated

20 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 5

20 years ago
The problem exists because of the unqualified reference to "location". It should
work with "window.location". Either way, it's still a valid compatibility bug.
(Reporter)

Comment 6

20 years ago
Both IE and Communicator work with an unqualified "location".  Is there a
standard for the DOM which specifies (or not) the implicit "with (window)"?
(Assignee)

Comment 7

20 years ago
The bug is just a result of the way we implemented window.location. In other
cases, the implict scope for unqualified references is the window.
(Assignee)

Comment 8

20 years ago
*** Bug 3582 has been marked as a duplicate of this bug. ***
(Assignee)

Updated

20 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 9

20 years ago
Fixed on 3/26/99. There was a bug in the resolve method for the Window JSClass.

Updated

20 years ago
Status: RESOLVED → VERIFIED

Comment 10

20 years ago
Bug is verified.
If we try this code, it shows that location object could be found.

code:

<html>
<head>
<title>dfhg</title>
</head>

<body >
<script>
<!--
if (location.search){
         document.location.replace("http://www.yahoo.com")}
else{
document.location.replace("http://www.hotmail.com")}
//-->
</script>
</body>
</html>

So marking this bug as verified.

Comment 11

19 years ago
Changing component to "Javascript Engine".  "Javascript" component is being
retired.
You need to log in before you can comment on or make changes to this bug.