April 20, 2024, 03:03:29 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Alert on Logout

Pages: [1]   Go Down
  Print  
Author Topic: Alert on Logout  (Read 1797 times)
0 Members and 1 Guest are viewing this topic.
Celebrus
Artificially Conscious
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 626



View Profile WWW
Badges: (View All)
Apple User
« on: April 30, 2009, 08:55:16 am »

Try this:
Code:
<script type="text/javascript">
var Leave = "YOUR TEXT";

var name = document.getElementsByTagName("span");
for(v=0;v<name.length;v++){
if(name[v].innerHTML.match(/Hello <b>(.*)<\/b>/i)){
var username = RegExp.$1;
};};
var Logout = document.links;
for(c=0;c<Logout.length;c++){
if(Logout[c].href.match(/action=logout/i) && Logout[c].parentNode.className == "maintab_back"){
Logout[c].onclick = function(){ if(confirm(Leave) == true) { window.location.href = smf_scripturl + "?action=logout"; } else { return false; } };
};};
if(Leave.match(/{user}/i)) Leave = Leave.replace(/{user}/i,username);
</script>

I basically just got what Agent wrote to return false.
Report Spam   Logged



Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy