freelanceprogrammers.org Forum Index » PHP

How to open a popup after a user closes browser window


View user's profile Post To page top
ejaincom Posted: Fri Nov 18, 2005 4:24 pm


Joined: 18 Mar 2005

Posts: 21
How to open a popup after a user closes browser window
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
Reply with quote
Send private message
View user's profile Post To page top
lucius_decrius Posted: Fri Nov 18, 2005 5:20 pm


Joined: 02 May 2005

Posts: 7
How to open a popup after a user closes browser window
<script>
window.onunload = function(){if(self.screenTop>9000)alert(`Closed.`)}
</script>

Only works on IE thoug...
Regards, Eduardo

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/
>
>
>
> SPONSORED LINKS
> Php developer
>
<http://groups.yahoo.com/gads?t=ms&k=Php+developer&w1=Php+developer&w2=Basic+pro
gramming+language&w3=Computer+programming+languages&w4=Programming+languages&w5=
Object+oriented+programming&w6=Object+oriented+programming+tutorial&c=6&s=189&.s
ig=Go57PZfEJUXyhVMKXHevgQ>
> Basic programming language
>
<http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Php+developer
&w2=Basic+programming+language&w3=Computer+programming+languages&w4=Programming+
languages&w5=Object+oriented+programming&w6=Object+oriented+programming+tutorial
&c=6&s=189&.sig=bhALr1AysJyo_QtFkNs-_g>
> Computer programming languages
>
<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=Php+devel
oper&w2=Basic+programming+language&w3=Computer+programming+languages&w4=Programm
ing+languages&w5=Object+oriented+programming&w6=Object+oriented+programming+tuto
rial&c=6&s=189&.sig=crWMbNuTpQo7GcDczXxC7g>
>
> Programming languages
>
<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Php+developer&w2=B
asic+programming+language&w3=Computer+programming+languages&w4=Programming+langu
ages&w5=Object+oriented+programming&w6=Object+oriented+programming+tutorial&c=6&
s=189&.sig=ilvPwIkcb6Rcgq8rB1VUuQ>
> Object oriented programming
>
<http://groups.yahoo.com/gads?t=ms&k=Object+oriented+programming&w1=Php+develope
r&w2=Basic+programming+language&w3=Computer+programming+languages&w4=Programming
+languages&w5=Object+oriented+programming&w6=Object+oriented+programming+tutoria
l&c=6&s=189&.sig=X-egmMGYu6ib76_snuXIAQ>
> Object oriented programming tutorial
>
<http://groups.yahoo.com/gads?t=ms&k=Object+oriented+programming+tutorial&w1=Php
+developer&w2=Basic+programming+language&w3=Computer+programming+languages&w4=Pr
ogramming+languages&w5=Object+oriented+programming&w6=Object+oriented+programmin
g+tutorial&c=6&s=189&.sig=TYAiLWTbKMLDLqFwDSFxFw>
>
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
> * Visit your group "php-objects
> <http://groups.yahoo.com/group/php-objects>" on the web.
>
> * To unsubscribe from this group, send an email to:
> php-objects-unsubscribe@yahoogroups.com
> <mailto:php-objects-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>


[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
wenca@... Posted: Fri Nov 18, 2005 6:38 pm


Joined: 18 Nov 2005

Posts: 2
How to open a popup after a user closes browser window
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
>
>
>
>
>
>
>
>
Reply with quote
Send private message
View user's profile Post To page top
onjayb1800 Posted: Fri Nov 18, 2005 9:23 pm


Joined: 18 Nov 2005

Posts: 4
How to open a popup after a user closes browser window
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

--- abhishek jain <ejaincom@...> 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
>




__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
Reply with quote
Send private message
View user's profile Post To page top
onjayb1800 Posted: Fri Nov 18, 2005 9:32 pm


Joined: 18 Nov 2005

Posts: 4
How to open a popup after a user closes browser window
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@...> 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
Reply with quote
Send private message
View user's profile Post To page top
delvtecsol Posted: Fri Nov 18, 2005 10:33 pm


Joined: 29 Apr 2005

Posts: 10
How to open a popup after a user closes browser window
Jonathan Brown wrote:

> <body onUload="<?=$javascript?>" >


Just noting the typo here-- that should be onUnload
Reply with quote
Send private message
View user's profile Post To page top
onjayb1800 Posted: Fri Nov 18, 2005 10:57 pm


Joined: 18 Nov 2005

Posts: 4
How to open a popup after a user closes browser window
LOL you`re right my bad... fingers getting ahead of themselves ;)
Thanks

--- In php-objects@yahoogroups.com, Brian Cummiskey <brian@h...> wrote:
>
> Jonathan Brown wrote:
>
> > <body onUload="<?=$javascript?>" >
>
>
> Just noting the typo here-- that should be onUnload
>
Reply with quote
Send private message
View user's profile Post To page top
flawdotcomdotbr Posted: Sat Nov 19, 2005 12:12 am


Joined: 19 Nov 2005

Posts: 1
How to open a popup after a user closes browser window
whats the relation of JAVASCRIPT with PHP-OBJECTS ?!!!!



------------- Segue mensagem original! -------------

De: "Tell you later" <onjayb1800@...>
Data: Fri, 18 Nov 2005 16:57:01 -0000
Para: php-objects@yahoogroups.com
Assunto: [php-objects] Re: How to open a popup after a user closes browser
window

LOL you`re right my bad... fingers getting ahead of themselves ;)
Thanks

--- In php-objects@yahoogroups.com, Brian Cummiskey <brian@h...> wrote:
>
> Jonathan Brown wrote:
>
> > <body onUload="<?=$javascript?>" >
>
>
> Just noting the typo here-- that should be onUnload
>







PHP Data object relational mapping generator - http://www.meta-language.net/
Yahoo! Groups Links
Reply with quote
Send private message
View user's profile Post To page top
ssk_quanta Posted: Sat Nov 19, 2005 8:50 am


Joined: 21 Apr 2005

Posts: 3
How to open a popup after a user closes browser window
hi all,

Can anyone help me in industry standard model view
controller(MVC)
for php?

regrds,
sasikumar
bangalore

Sasikumar S
MSPL
Bangalore
080 55302322




__________________________________________________________
Enjoy this Diwali with Y! India Click here
http://in.promos.yahoo.com/fabmall/index.html
Reply with quote
Send private message
View user's profile Post To page top
anuis_tvm Posted: Sat Nov 19, 2005 9:46 am


Joined: 19 Nov 2005

Posts: 1
How to open a popup after a user closes browser window
HI sasi Kumar u can use ZNF frame work.....as a part of MVC Architecture


plz search for ZNF Frame work

Bye
Anu I S
Technopark
Trivandrum


sasikumar shanmugam <ssk_quanta@...> wrote:
hi all,

Can anyone help me in industry standard model view
controller(MVC)
for php?

regrds,
sasikumar
bangalore

Sasikumar S
MSPL
Bangalore
080 55302322




__________________________________________________________
Enjoy this Diwali with Y! India Click here
http://in.promos.yahoo.com/fabmall/index.html


PHP Data object relational mapping generator - http://www.meta-language.net/



---------------------------------
YAHOO! GROUPS LINKS


Visit your group "php-objects" on the web.

To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---------------------------------






---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.

[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
amirrudin_ya... Posted: Sat Nov 19, 2005 6:08 pm


Joined: 19 Nov 2005

Posts: 1
How to open a popup after a user closes browser window
hi...

i dont know any standard mvc for php. i recommend u try mojavi...simple and
easy to use...can download at www.mojavi.org

sasikumar shanmugam <ssk_quanta@...> wrote: hi all,

Can anyone help me in industry standard model view
controller(MVC)
for php?

regrds,
sasikumar
bangalore

Sasikumar S
MSPL
Bangalore
080 55302322




__________________________________________________________
Enjoy this Diwali with Y! India Click here
http://in.promos.yahoo.com/fabmall/index.html


PHP Data object relational mapping generator - http://www.meta-language.net/



---------------------------------
YAHOO! GROUPS LINKS


Visit your group "php-objects" on the web.

To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---------------------------------






---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.

[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
raylance Posted: Sun Nov 20, 2005 8:36 pm


Joined: 20 Nov 2005

Posts: 4
How to open a popup after a user closes browser window
Php runs on the server, ecmascript runs on the client (browser).
----- Original Message -----
From: Marcus Vinícius
To: php-objects@yahoogroups.com
Sent: Friday, November 18, 2005 1:12 PM
Subject: Re: [php-objects] Re: How to open a popup after a user closes browser
window



whats the relation of JAVASCRIPT with PHP-OBJECTS ?!!!!



------------- Segue mensagem original! -------------

De: "Tell you later" <onjayb1800@...>
Data: Fri, 18 Nov 2005 16:57:01 -0000
Para: php-objects@yahoogroups.com
Assunto: [php-objects] Re: How to open a popup after a user closes browser
window

LOL you`re right my bad... fingers getting ahead of themselves ;)
Thanks

--- In php-objects@yahoogroups.com, Brian Cummiskey <brian@h...> wrote:
>
> Jonathan Brown wrote:
>
> > <body onUload="<?=$javascript?>" >
>
>
> Just noting the typo here-- that should be onUnload
>







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














PHP Data object relational mapping generator - http://www.meta-language.net/



------------------------------------------------------------------------------
YAHOO! GROUPS LINKS

a.. Visit your group "php-objects" on the web.

b.. To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------------------------------------------------------------------------------



[Non-text portions of this message have been removed]
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help