window.open fails in inline mouse-event-handlers

VERIFIED INVALID

Status

()

Core
DOM: Core & HTML
VERIFIED INVALID
17 years ago
17 years ago

People

(Reporter: Wolfgang Schwarz, Assigned: jst)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
<a href="#" onclick="open('http://www.mozilla.org','aname')">click</a>

should open a new browser window. But in M0.8/win98, it doesn't. Instead it only 
erases the current document. 
Maybe this is related to Bug 68955, but this one here affects all kinds of 
elements and many different handlers and is independent of the return value. So 
these examples also don't work:

<button onclick="open('http://www.mozilla.org','aname')">click</button>

<button onmouseover="open('http://www.mozilla.org','aname')">hover</button>

If you call a function which then opens the window, it will work. Similarly, if 
you assign the handler as object property, it works:

document.links[0].onclick=function(){
   open('http://www.mozilla.org','aname');
}

It also works in <body onload=...>.
(Reporter)

Comment 1

17 years ago
Created attachment 25451 [details]
testcase
I think this bug is invalid. Does your code work in any other browser?
In event handlers AIUI, open === document.open.
So use window.open(), if you mean that.
(Reporter)

Comment 3

17 years ago
oh dear, stupid me. Of course you're right. I'm sorry.
(Assignee)

Comment 4

17 years ago
Invalid.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID
verified invalid.
Status: RESOLVED → VERIFIED

Comment 6

17 years ago
*** Bug 56075 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.