This is my javascript file
.focus() doesnt seem to work
Code:
function signin_check() { var e_id=document.getElementById("abcd"); var paswd=document.getElementById("bcd"); if(e_id.value=="") { alert("Please enter your username/email address"); e_id.focus(); } else if(paswd.value=="") { alert("Please enter the password"); paswd.focus(); } else { var a=document.getElementById("signinform"); a.setAttribute('action', 'home.xhtml'); } }
Comment