Re: Exit code for a html page
connoisseur.infotech@gmail.com wrote:
> We have a website we need to open popup under following conditions
> 1) When user close the browser either via X button or alt + f4, file ->
> Close
> 2) when he changes URL and goes to some other site.
>
> 3) but it should not open the popup window till the user is on same
> website.
>
> we have tried lot of combinations but till date nothing there.
>
> We look forward for your help to resolve this issue.
> this is now becoming big for us and for our client
> thanks
> Parminder
> Connoisseur Infotech Pvt. Ltd.
> <a href="http://www.econnoisseur.com" target="_blank"> Complete web
> development and web designing company http://www.econnoisseur.com/
> </a>
You may use the unload event to open the popup. When a page gets loaded,
step through all links and add a javascript click handler which will set
a global variable. Check for that variable in your unload handler. If it
is not present, show the popup.
Daniel
Fup 2 comp.lang.javascript
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735