Re: Part II: Help on JavaScript Windows with PHP
| From: | Bogdan Stancescu | Date: | Fri, 28 Dec 2001 23:31:50 +0000 |
| Subject: | Re: Part II: Help on JavaScript Windows with PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78982@lists.php.net to get a copy of this message | ||
The way it looks to me, you do both the window opening sequence and the closing
procedure twice:
- Window opening: you specify window options (toolbar, status bar etc) once in the
window.open() call and once in the actual window code;
- Window closing: you perform the same actions once upon clicking on "Close e
Update" and once upon actual window closing (via onUnload()).
Try implementing both procedures only once in a way that they're ran by both types
of browsers.
AFAIK you don't need to implement any kind of captureEvents, but I may be wrong
about it.
Only now did I read your final paragraph: I think you'd better leave the
onUnload() in place and only window.close() in the link, which should trigger
onUnload(). Hope this works with NS 4.x!
I don't have any clue why closing the pop-up via Windows controls both doesn't
trigger onUnload and reloads the parent window -- are you sure you're not wrong
about this? I mean, if it reloads the parent window, doesn't this mean that
onUnload() works?
My suggestion is fiddling with the onUndload() function triggering it via a link
(as suggested in the previous message -- with a href="javascript:oldWin()") until
you get no error messages when accessing "javascript:" in Netscape. You didn't
tell me -- do you get any more error messages now upon accessing "javascript:"?
Bogdan
Carlos Fernando Scheidecker Antunes wrote:
> Hello Bogdan,
>
> On Microsoft Internet Explorer:
> On Netscape and Konqueror: