Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
196
rated 0 times [  197] [ 1]  / answers: 1 / hits: 24766  / 12 Years ago, mon, december 31, 2012, 12:00:00
window.onbeforeunload = function() {
if (document.getElementById(parentpan).style.display == block) {
return You are logged out.;
Logout();
}
};


I want the logout() function to be called after the return statement, is it possible?


More From » jquery

 Answers
4

The return statement ends a function, you cannot execute code after it. You could do this:



ret = You are logged out.;
Logout();
return ret;

[#81151] Friday, December 28, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tyasiaalmap

Total Points: 294
Total Questions: 107
Total Answers: 108

Location: Libya
Member since Mon, Dec 7, 2020
4 Years ago
;