0

Why isn't it working !?

var inm = ["hacker","unknown"]; function validator() { var checkun = document.getElementById("userName"); if(checkun.value == "" ) { alert("You must fill in your User name"); return false;} else if(checkun.value == "

quot; || "*") { alert (' You cannot use " $ " '); return false; } else if(checkun.value == iun[0]) { alert ("The username " + [0] + "is invalid."); return false; } else { alert("success! "); return true; } }

19th Dec 2016, 6:31 PM
Elmahfoud Majidi
Elmahfoud Majidi - avatar
5 Respuestas
+ 5
Give me you projects link and i'll fix it for you.
20th Dec 2016, 1:03 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
somewhere in your code you put a [0] standing alone (replace with inm[0]?)
19th Dec 2016, 7:28 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
array iun not defined (i think you wanted to write inm)
19th Dec 2016, 7:25 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
chekun.value == "
quot; || "*" should be replaced by chekun.value == ("
quot; || "*")
19th Dec 2016, 7:26 PM
Valen.H. ~
Valen.H. ~ - avatar
0
I have tried what you explained but still not responding 😯😨
19th Dec 2016, 8:46 PM
Elmahfoud Majidi
Elmahfoud Majidi - avatar