Re: How to open a popup after a user closes browser window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I need to do something like this I usually do a
combination of PHP and javascript. Something like this

if(!$_POST['foo'])){
  $javascript = "popUp();";
}else{
  $javascript = null;
} 

In the body tag just add
<body onUload="<?=$javascript?>" >
This way if the page has been submited by a form you
won't see your popup. Hope this addresses your needs
and I understand your question properly.

Jonathan


--- Wenca <wenca@xxxxxxxxxxxx> wrote:

> Mozilla has an onClose event. Try it.
>
http://www.mozilla.org/docs/dom/domref/dom_window_ref56.html#1018253
> 
> Wenca
> 
> abhishek jain wrote:
> > Hi Friends,
> > I need to create an application that will open a
> popup
> > when the user closes a window. I can do that
> easily
> > via onUnload event of javascript but the catch is
> that
> > the popup must open only when we close the window
> and
> > not when we submit a form or click a link on the
> page.
> > Actually it is a survey which opens only when one
> > closes the window.
> > I think i am clear.
> > Any help will be apreciated.
> > I am not sure that this is a problem with php or
> html
> > but pl. help.
> > --
> > Regards
> > Abhishek jain
> > 
> > 
> > 		
> > __________________________________ 
> > Start your day with Yahoo! - Make it your home
> page! 
> > http://www.yahoo.com/r/hs
> > 
> > 
> > 
> > PHP Data object relational mapping generator -
> http://www.meta-language.net/ 
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> 



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/u8TY5A/tzNLAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux