Author Topic: Redirect on logout  (Read 7612 times)

0 Members and 1 Guest are viewing this topic.

rflribeiro

  • Jr. Member
  • **
  • Posts: 2
Redirect on logout
« on: November 20, 2009, 09:18:16 PM »
Hi all.
We need to redirect customer to an customized page after closing chat (via button).
Anybody knows how to to that?
Thanks in advance.

Inspirer

  • Mibew Project founder
  • Native
  • *****
  • Posts: 262
    • Mibew Messenger
Re: Redirect on logout
« Reply #1 on: November 23, 2009, 07:40:28 PM »
Edit /webim/js/source/chat.js, line 162

  onThreadClosed: function(_response) {
   var xmlRoot = Ajax.getXml(_response);
    if( xmlRoot && xmlRoot.tagName == 'closed' ) {
     setTimeout('window.close()', 2000);
   } else {
     this.handleError(_response, xmlRoot, 'cannot close');
   }
  },

Replace setTimeout('window.close()', 2000); with your code, for example:

window.location.href = "http://...../done.php"

PS: Read http://mibew.org/forums/index.php?topic=329.0 to compile your javascript.