Closed Bug 86307 Opened 23 years ago Closed 23 years ago

location.href doesn't work with relative urls

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 83332

People

(Reporter: boecko, Assigned: jst)

Details

(Keywords: regression)

Attachments

(2 files)

Hi,
i've got a Fireworks-generated Javascript which has worked with 0.9.0
but fails in 0.9.1
hier is the debug message:

Error: [Exception... "Component returned failure code: 0x80004005
(NS_ERROR_FAILURE) [nsIDOMLocation.href]"  nsresult: "0x80004005
(NS_ERROR_FAILURE)"  location: "JS frame :: http://localhost/fw_menu.js ::
onMenuItemAction :: line 471"  data: no]
Source File: http://localhost/fw_menu.js
Line: 471

line 471 is:
parent.framename.location.href = url;
Over to DOM 0.

Reporter, could you possibly attach a testcase to this bug using
http://bugzilla.mozilla.org/createattachment.cgi?id=86307 ?
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
Summary: location.href doesn't work → location.href doesn't work
The Attachement is of type application/x-tar:gzip

with mozilla 0.9.0 you should get a SUCCESS in the lower frame, when you click
on a menu item.
mozilla 0.9.1 produces an error.

Target Milestone: --- → mozilla0.9.1
WinZip doesn't let me open the testcase, it says it's not a valid zip archive.
Anything I did wrong?
One guess without seeing the testcase: Are you setting the frame location to a
page that is not on your domain?
Winzip is right. it's no zip-archive... it's a tar.gz-archive..

the ...location.href points to a local file.
is this a local file as in "http://localhost/..." or a local file as in
"file:///..." ? 
the url is relative.

when you click on the button in the upper frame (Internet->Provider->Neu)
an alert-box pops up with new url for the lower frame.
but the loading fails
Hmm.. Does it work if you make the URL absolute?  Looks like we may have a
problem with relative urls and setting location.href...
yes...

it works with an absolute url, like:
parent.main.location.href = "http://localhost/success.html"
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: location.href doesn't work → location.href doesn't work with relative urls
Target Milestone: mozilla0.9.1 → ---
I'm thinking this bug was a dup of 83332, which was fixed yesterday, could
someone test with a build from this morning?
This worksforme now with build 2001-06-20-06.  Marking duplicate.

*** This bug has been marked as a duplicate of 83332 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: