initLang(); document.getElementById("cguButton").addEventListener("click", function(e) { e.preventDefault(); new HttpRequest(HttpRequestMethod.PUT, "account/cguAccept") .callbackSuccess(function() { document.location.reload(); }) .callbackError(function() { //FIXME error }) .send(); return false; });