Closed Bug 87968 Opened 24 years ago Closed 22 years ago

window.open() opens a new window when it shouldn't (using "_self" changes frame name to "_self")

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: kazhik, Assigned: john)

References

Details

window.open() opens a new window when it shouldn't. http://www.geocities.co.jp/NeverLand/1048/temp/ Access to the abobe URL, and click [1] and [2]. [1] is "javascript:window.open('./main.html', '_self')". The contents is loaded in the same window. [2] is "javascript:window.open('./main.html', 'main')". It should work as [1], but opens a new window.
Bulk reassignin HTML FRAME/IFRAME bugs to Eric.
Assignee: pollmann → evaughan
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1
There is a workaround. Apparently the problem cames because the navigator does not recognize the name of the frame. If the open uses the frame number there is no problem. instead of window.open('......','main'); use parent.frame[n].open('......','_self'); where n is the number of the frame in the frameset and the document loads in the correct place.
Excuse me, the correct javascript syntax for the workaround is parent.frames[n].open('......','_self');
with the syntax parent.main.open('......','_self'); the navigator does nothing.
Bulk re-assigning all of Eric's HTMLFrame bugs to John.
Assignee: eric → jkeiser
Status: ASSIGNED → NEW
here another case of window opened mouse over iniate the process http://www.astro.at/Seite03_D/MAIN_gkm.htm take a look at the image after "mehr zum thema häusersystem" didn't ask for that window to open could mean a workaround for usual pop-ups build id 2002040803 win me unchecked: scripts & windows open unrequested windows checked: open a link in a new window move or resize existing windows raise or lower windows i hope this little contribution is helpfull as i enjoy a lot to have no more pop-ups :-) regards max
*** Bug 183054 has been marked as a duplicate of this bug. ***
Summary: window.open() opens a new window when it shouldn't → window.open() opens a new window when it shouldn't (using "_self" changes frame name to "_self")
retargeting
Target Milestone: mozilla1.1alpha → Future
This got fixed by the patch in bug 208862
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 129152 has been marked as a duplicate of this bug. ***
Product: Core → Core Graveyard
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.