Changed onkeypress to onkeyup

and made submit button only work if valid name