1

I've some problem with requesting an URL when finishing (exit) the widget. I try to use it via window.widget.onexit on request then an logout URL which makes some logs in the backend. I tried it by the following ways:

window.widget.onexit = function() {

 xhr = new XMLHttpRequest;
 xhr.open("GET", "http://new-ken.de/alwaysOn/php/logout.php", false );   
 xhr.send(""); 

}

AND

window.widget.onexit = function() {

  window.location.href = "http://new-ken.de/alwaysOn/php/logout.php";

}

Does somebody have an idea to solve this little problem? Thanks!

Justin Johnson
  • 30,978
  • 7
  • 65
  • 89
Micha
  • 11
  • 1

1 Answers1

1

Try to use this code:

widget.openURL("http://new-ken.de/alwaysOn/php/logout.php");
Sled
  • 18,541
  • 27
  • 119
  • 168
msibai
  • 11
  • 2