2 replies
by jay eckles
I have searched for the same answer myself. The best I have found is to do the following:
Create a framset with two frames:
As you can see, one frame is totally hidden. In "persistent.htm", put your code in the onUnLoad event. Make the src of the other (visible) frame your normal page. The experience is invisible to the user - he or she has no idea there are any frames, and the only way the onUnLoad event of persistent.htm fires is if the user either closes the browser or enters a new location in the "Address" field in the browser.
If you want your message to pop up whenever the user leaves index.htm (instead of the whole site), then use a baseref with target=top.
That is the best solution I've come across.
by pradeepbhat
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending