Add warning popup on chat module/page?

Hi, 

 

Does anyone know how to add a warning popup to the chat module? So when user's try to navigate away, they get a warning that they'll loose all open chats etc... ??

Thanks

Quote · 30 Jul 2013

any thoughts? I tried adding soem javascript I've found but it doen't seem to do the trick...

Quote · 1 Aug 2013

bump/...

Quote · 13 Aug 2013

.

Quote · 20 Aug 2013

not a 'pop-up' but you could always add this information to the chat welcome note which first appears when entering the chat room!  I use my area to warn chatters of the rules and that moderators are watching etc.

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 20 Aug 2013

Edit: you can add it by going into chat room as admin and changing room settings ...

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 20 Aug 2013

Right I've tried that, they don't really take note of it. A nice warning forcing them to click ok to continue would be ideal.

Quote · 21 Aug 2013

This is probably going to be a job for javascript (or jquery which is a library for javascript).  You need to detect when a request is made to leave the page and post an alert message with OK and Cancel buttons.

Geeks, making the world a better place
Quote · 21 Aug 2013

Here is one I found:

staying_in_site = false;
 
Event.observe(document.body, 'click', function(event) {
  if (Event.element(event).tagName == 'A') {
    staying_in_site = true;
  }
});
 
window.onunload = popup;
 
function popup() {
  if(staying_in_site) {
    return;
  }
  alert('I see you are leaving the site');
}

explanation at http://www.pgrs.net/2008/01/30/popup-when-leaving-website/

I am sure if you search the net you will find something that will work for your situation.

Geeks, making the world a better place
Quote · 21 Aug 2013

Thanks, I never came across that one. All t he ones I seemed to have come across were about adding a popup to a form if you started to fill it...

I'll give this bit a try.

Quote · 21 Aug 2013

We may have to work a bit to get a solution that works.

Geeks, making the world a better place
Quote · 21 Aug 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.