"Daniel Kirsch" <Iw************ *****@gmx.de> kirjoitti
viestissä:d8*** **********@news .t-online.com...
co************* *****@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.econnoisseu r.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.
Problem there is that it would pop up constantly when switching pages inside
the same website. At least that's how I understood it. Meaning if I have two
pages, named A and B under domain
www.my_stupid_domain.com, when I clicka
link on page A that leads me to B, no pop up is shown. When I move from B
back to A no popup is presented either. When I close the browser, then and
only then the pop up appears. If that is in fact the requirements, I see a
potentially terrible terrible solution - but it might work. Make a frame
container that has two frames, which has rows 100% and *. Inside the 100%
frame you have the pages. When you move from one page to another inside the
frame, nothing happens. Now, in the invisible * frame you have nothing
except this:
<html><body onUnload="show_ the_damn_popup( );"></body></html>. When you close
the browser, or move to another location (ie. when the frame is closed.),
the bottom frame is exited, thus onUnload is triggered.
I know it is completely pointless to tell that what you are doing there is
once again hating your clients so much that you wish to irritate them with a
pop up, and I for one would not approve such behaviour on my site. But
people are willing to do so much to drive their clients away from crappy web
sites, I'm not at all surprised you want to do this, so a possibly working
solution is suggested above. Feel free to use it.
Did you know that when one little panda makes a pop up window attack another
little pandas browser, that's hypertextual harrasment. And that makes me a
saaad panda...
(Disclaimer: If you haven't watched South Park, ignore that, you won't get
it.)
--
"I am pro death penalty. That way people learn
their lesson for the next time." -- Britney Spears
et************* ***@5P4Mgmail.c om