diff --git a/tools/check_name.js b/tools/check_name.js
index 6074c341..c0e0fd18 100644
--- a/tools/check_name.js
+++ b/tools/check_name.js
@@ -17,7 +17,10 @@ function checkName()
if(document.getElementById("character_name").value=="")
{
- $('#character_error').html('Please enter new character name.');
+ $('#character_error').html('Please enter new character name.');
+ var $characterIndicator = $('#character_indicator');
+ $characterIndicator.attr('src', 'images/global/general/nok.gif');
+ $characterIndicator.show();
return;
}
@@ -36,16 +39,18 @@ function checkName()
var name = document.getElementById("character_name").value;
$.getJSON("tools/validate.php", { name: name, uid: Math.random() },
- function(data){
+ function(data) {
+ var $characterIndicator = $('#character_indicator');
if(data.hasOwnProperty('success')) {
$('#character_error').html ('' + data.success + '');
- $('#character_indicator').attr('src', 'images/global/general/ok.gif');
+ $characterIndicator.attr('src', 'images/global/general/ok.gif');
}
else if(data.hasOwnProperty('error')) {
$('#character_error').html('' + data.error + '');
- $('#character_indicator').attr('src', 'images/global/general/nok.gif');
+ $characterIndicator.attr('src', 'images/global/general/nok.gif');
}
- lastSend = timeNow;
+ $characterIndicator.show();
+ lastSend = timeNow;
});
}
\ No newline at end of file