Closed Bug 366420 Opened 18 years ago Closed 18 years ago

document.url has no setter

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: taylorj2, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

you can't asign a value to document.url in order to reload a page
document.url is an alias for window.location.href which still can be asigned to
correctly.
document.url needs a setter creating to assign a value to window.location.href

Reproducible: Always

Steps to Reproduce:
1.create a webpage with a script file in it containing the line document.url="http://www.google.com"
2.launch that webpage in mozilla
3.look at the error console to see the error
Actual Results:  
Error: setting a property that has only a getter
Source File: file:///F:/temp/ibmbanner.html?com.ibm.cics.ts.doc
Line: 12

Expected Results:  
page reloads to new page (script was meant to fix urls containing com.ibm.cics.ts.doc to com.ibm.cics.ts31.doc)
The DOM spec clearly states that document.URL is readonly.

http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-46183437
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.