I'm developing a web chat and I need to raise an event when the conversation has changed so the page title changes so one user can know that the other user has written anything.
So I tried the code:
addEvent(window,'focus',function(){ alert(1); } );
and addEvent(document,'focus',function(){ alert(2); } );
but it does not work.
I need the event to be raised even if the user does not click on the web page.
For that event, I've got the solutions:
<body onclick="showClickedElement(this);" >
Is there any solution?
Thanks in advance.