aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--loginregister.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/loginregister.js b/loginregister.js
index f3b6f9a..cb87444 100644
--- a/loginregister.js
+++ b/loginregister.js
@@ -40,17 +40,16 @@ update();
function clear_hero_errors()
{
- var errors = document.getElementsByClassName("hero_form_error");
- var i;
- for (i = 0; i < errors.length; i++)
+ let errors = document.getElementsByClassName("hero_form_error");
+ for (let i = 0; i < errors.length; i++)
{
errors[i].hidden = true;
}
}
function validate_hero_login_form()
{
- var username=document.forms["login_form"]["username"].value;
- var flag=true;
+ let username=document.forms["login_form"]["username"].value;
+ let flag=true;
clear_hero_errors();
if(username.length==0)
@@ -63,12 +62,12 @@ function validate_hero_login_form()
}
function validate_hero_form()
{
- var username=document.forms["register_form"]["username"].value;
- var email=document.forms["register_form"]["email"].value;
- var password=document.forms["register_form"]["password"].value;
- var password2=document.forms["register_form"]["password2"].value;
+ let username=document.forms["register_form"]["username"].value;
+ let email=document.forms["register_form"]["email"].value;
+ let password=document.forms["register_form"]["password"].value;
+ let password2=document.forms["register_form"]["password2"].value;
- var flag=true;
+ let flag=true;
clear_hero_errors();
if(username.length==0)