Hi,
I am using Javascript for a user login to a web page. There are two text boxes, name and passsword and a dropbox, where either administrator or student is chosen. It was working before I added the dropbox... now its not doing anything... can anyone see a problem with this code?
Code:
function check_login(form) { 
 	if (form.ID.value=="name") { 
    		if (form.pass.value=="pass") {
			if (form.auth.value=="student"){ 
      	    			location="home.html"
			} 
     		} 
		else { 
      			alert("Sorry " +form.ID.value+ ", wrong password.") 
    		}
    		
    		else 
    		if (form.pass.value=="admin") { 
			if (form.auth.value=="administrator"){
        			location="homeAdmin.html" 
			}
    		} 
    		else { 
        		alert("Sorry " +form.ID.value+ ", wrong password.") 
     		}
    		
	}
  	else
  	{ 
    		alert("Invalid Name") 
  	} 
}
Thanks