how can I submit a httprequest in javascript
I would like to submit the url like that : "ReportController?action=logout" in javascript, how can I do that? Because I have implemented a logout menthod for windows onbeforeunload event, which means when user close brower, the logout action will be automatically triggered and submitted to server. I use the below method, but it seems doesn't work.
function logout() {
document.mainform.method="post";
document.mainform.action="ReportController?action=logout";
document.mainform.target="_self";
document.mainform.submit();
}
Message was edited by:
henry_22
Message was edited by:
henry_22

