I am trying to make a username, ID and password linking form but i need to make sure that the program recognises that a username has been selected. This is what I have done:
var usernameBox = document.getElementsByName("uop");
usernameBox.onclick = function(){
if (usernameBox.options[usernameBox.selectedIndex].value == false){
alert("Please choose your username");
}
}
This does not work for me and I am a beginner to javascript so I'm not very familiar with a lot of the concepts but that's what learning is for right.