Advertisement
Guest User

login.js im et_chat

a guest
Apr 24th, 2014
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. /* ##########################################################################
  2. # ET-Chat v3.x.x
  3. # Lizenz: CCPL - http://creativecommons.org/licenses/by-nc/2.0/de/
  4. # Autor: Evgeni Tcherkasski <SEDesign />
  5. # E-mail: info@s-e-d.de
  6. # WWW: http://www.sedesign.de
  7. ############################################################################*/
  8.  
  9. function etchat_login() {
  10.  
  11. if (!Element.visible('lay_pw')) $('pw').value='';
  12. $('submit_button').disabled = true;
  13.  
  14. var myAjaxObj= new Ajax.Request(
  15. "./?CheckUserName",
  16. {
  17. onSuccess: function(ajaxResult) {
  18. if (ajaxResult.responseText==1) location.href='./?Chat';
  19. else{
  20. $('submit_button').disabled = false;
  21. if (ajaxResult.responseText=='pw' || ajaxResult.responseText=='pw+invisible') {
  22. Element.show('lay_pw');
  23. if (ajaxResult.responseText=='pw+invisible') Element.show('lay_invisible');
  24. Element.hide('lay_gender');
  25. $("pw").focus();
  26. } else {
  27. if (ajaxResult.responseText=='blacklist') location.href="./?AfterBlacklistInsertion";
  28. else if(!ajaxResult.responseText.empty()) alert(ajaxResult.responseText);
  29. else {
  30. $('username').value='';
  31. $('username').focus();
  32. }
  33. }
  34. }
  35. },
  36. postBody: $("login").serialize()
  37. }
  38. );
  39.  
  40. return false;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement