Closed Thread Icon

Topic awaiting preservation: Mozilla hates self.close() (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8527" title="Pages that link to Topic awaiting preservation: Mozilla hates self.close() (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Mozilla hates self.close() <span class="small">(Page 1 of 1)</span>\

 
norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 02-12-2003 20:38

I've been playing with DHTML. I have a Layer that floats across the page, and when it reaches the edge, the window closes. This works in IE, but Mozilla will not respond to self.close(). Any ideas why this usually cooperative browser is being so stubborn?

you know, it's kinda nice over here in the client-side forum. Plenty of good coding tips, nice scenery....I may just have to take a little time off from Lurking over at the server-side forum and hang out here more often!




/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 02-13-2003 02:16

just in case anyone else is trying to do the impossible, I found out that Mozilla only allows self.close() for windows opened by script.

Suicide is OK for Pop-Ups, but not Parent windows. That seems like discrimination to me.

/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-13-2003 02:23

Security reasons.

Otherwise, you could make a page that just closes the user's browser window immediately. How annoying would that be?

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 02-13-2003 02:35

Good point! If I had truly intended something malicous, as a proper villain I would now be forced to say "Curses, foiled again" .



/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

Clay
Nervous Wreck (II) Inmate

From: Utreg, NL
Insane since: Nov 2002

posted posted 02-13-2003 09:18

I'm not sure if I should post it, but there is a "hack" that allows you to close a user-opened window anyway, bypassing the "are you sure" message you get for these windows. The trick lies in telling the window that in fact he is not himself, but "someone else". (how's that for 9:17 am )

In my opinion certain things that are possible in script though can better be left undone. I'd loath the day that a "bypass the 'close this window?' message for closing user windows" script would become available for download on sites like dynamicdrive e.t.c. Just like I dislike (and that's a nice way of saying it ) sites that resize my browserwindow, go fullscreen, or open an additional popup to show the intended site.

It might sound like boring matter, but usability is in fact a pretty interresting and very important issue.

peterned

« BackwardsOnwards »

Show Forum Drop Down Menu