Closed Bug 69084 Opened 24 years ago Closed 24 years ago

window.open fails in inline mouse-event-handlers

Categories

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

x86
Windows 98
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: wo, Assigned: jst)

References

Details

Attachments

(1 file)

<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=...>.
Attached file 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.
oh dear, stupid me. Of course you're right. I'm sorry.
Invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
verified invalid.
Status: RESOLVED → VERIFIED
*** 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.

Attachment

General

Created:
Updated:
Size: