Forum OpenACS Q&A: Response to HELP I need sound allert on chat

Collapse
Posted by David Kuczek on
Hello Ben,
<br><br>
I encountered a javascript based instant messaging system on a German platform. It gives community members the option to send an IM to other members that are currently online. To make this possible they are integrating the following js code into every page:

<pre>
function showShortmessage(strAction)
{
    if (!strAction) strAction = "";
    jetzt = new Date();
    instWindow=window.open("/popup/instant_message.asp?sess=87E8A661x0992x40E3xAEE6x30CCD8D30B35m80x132x237x223&proxy=434&action="+strAction+"&zeit="+jetzt.getTime(), "Instantmessage", "toolbar=no,menubar=no,scrollbars=yes,width=508,height=300");
    instWindow.focus();
}
</pre>

A solution would be to write a trigger that sends such a popup request to a list of online chat admins whenever a user enters the chat (a system message is inserted into the chat table). Additionally you could let the popup make some sound if you like.
<br><br>
When somebody with more javascript experience could jump into the popup thing and maybe somebody else into letting the popup make a sound, I could work on the trigger, because it surely would be a useful crm function...