A tumblelog CMS built on AJAX, PHP and MySQL.

tools.js 906B

123456789101112131415161718192021222324252627282930313233343536
  1. //<!--
  2. function validateFrmAddUser() {
  3. if ($('login').value == "") {
  4. alert("The username field cannot be left blank.");
  5. document.frm_add.login.select();
  6. return false;
  7. }
  8. if ($('password').value == "") {
  9. alert("The password field cannot be left blank.");
  10. document.frm_add.password.select();
  11. return false;
  12. }
  13. if ($('password').value != $('repass').value) {
  14. alert("The password must match,\nplease verify them.");
  15. document.frm_add.password.focus();
  16. return false;
  17. }
  18. return true;
  19. }
  20. function verifyExistingUser() {
  21. $('div-process').style.display="block";
  22. el = $('target');
  23. el.style.display="block";
  24. var path = 'ajax.php?action=verify&login='+$('login').value;
  25. new Ajax(path, {
  26. onComplete:function(e) {
  27. el.setHTML(e);
  28. $('div-process').style.display="none";
  29. }
  30. }).request();
  31. return false;
  32. }
  33. //-->