Closed
Bug 257262
Opened 20 years ago
Closed 19 years ago
window.location.replace('mailto:') causes javascript error (NS_ERROR_FAILURE) [nsIDOMLocation.replace]
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 236589
People
(Reporter: bob, Unassigned)
References
()
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9
When this javascript function:
function js_email(name,host) {
var email = "o:" + name + "@" + host;
window.location.replace('mailt'+email);
}
is invoked like this:
<a href="javascript:js_email('newsletter','vbc.bc.ca');">newsletter AT vbc.bc.ca</a>
The result is this javascript error:
Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.replace]" nsresult: "0x80004005
(NS_ERROR_FAILURE)" location: "JS frame :: http://www.vbc.bc.ca/contact.shtml
:: js_email :: line 35" data: no]
Reproducible: Always
Steps to Reproduce:
1. Click on any email addess on this page.
2.
3.
Actual Results:
The "mailto:" was not executed, and a javascript error occurred.
Expected Results:
The email program should have been invoked.
This works OK with IE and Opera.
Comment 1•20 years ago
|
||
Confirmed.
Status: UNCONFIRMED → NEW
Component: General → Browser-General
Ever confirmed: true
OS: Linux → All
Product: Firefox → Browser
Hardware: PC → All
Summary: mailto: in window.location.replace causes javascript error → window.location.replace('mailto:') causes javascript error (NS_ERROR_FAILURE) [nsIDOMLocation.replace]
Version: unspecified → 1.7 Branch
Comment 2•20 years ago
|
||
Confirmed on:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803
Firefox/0.9.3
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803
Problem still exists in Linux 1.0 preview. It no longer existed in the Windows
1.0 preview.
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 4•20 years ago
|
||
WFM
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Bob, can you still reproduce with a nightly trunk build?
Assignee: firefox → general
Component: General → DOM
Product: Mozilla Application Suite → Core
QA Contact: general → ian
Version: 1.7 Branch → Trunk
Comment 5•19 years ago
|
||
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20050910 Firefox/1.6a1
ID:2005091022
Works for me. Please reopen if reproducible in the latest builds.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Updated•19 years ago
|
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Comment 6•19 years ago
|
||
Or better yet, let's dupe it. :)
*** This bug has been marked as a duplicate of 236589 ***
Status: REOPENED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•