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

Collapse
Posted by Jonathan Ellis on
maybe I wasn't patient enough, but I ended up creating my own login :)

there's some pretty retarded html going on, but the javascript you pasted just opens up "my instant messenger." It's on that page because it's linked to the "my IM" and "away" hrefs. the send is handled by the form on visitenkarte. I can't paste it b/c bboard is turning it into an actual form but look for

input type=text name="instanttext" value="" class=schrift maxlength=255 size=30
I think it's the only form on that page anyway.

the checking for messages is done by the mailreload/mailcheck functions on the "main page" (default.asp). It's pretty clever; mailreload loads an image from the mailcheck page

function mailReload()
{ mailswap=new Image();
  jetzt = new Date();
  mailswap.src="/redirect/mailcheck.asp?sess=...&proxy=8528&time="+jetzt.getTime();
  mailcheck();
}
and then mailcheck takes the correct action based on the width of the image returned, including bringing up the "IM" popup. note that it uses window.settimeout to do this check this every 10 seconds.