For some reason when I hit enter on my javascript form nothing happens, I must click the logon button for it to work. Here is the function that builds the logon form
Is it possible to make this work when the user hits the enter button?Code:function BuildPanel() { document.write('<form name="logon"><table align="center" border="0"><tr><td align="right">'); document.write('<small><font face="Verdana">Username:</font></small></td>'); document.write('<td><small><font face="Verdana"><input type="text" name="username" size="20"></font></small></td></tr>'); document.write('<tr><td align="right"><small><font face="Verdana">Password:</font></small></td>'); document.write('<td><small><font face="Verdana"><input type="password" name="password" size="20"></font></small></td></tr>'); if(imgSubmit == ""){ document.write('<tr><td align="center" colspan="2"><p><input type="button" value="Logon" name="Logon" onclick="login(username.value,password.value)">'); } else { document.write('<tr><td align="center" colspan="2"><p><input type="image" src="'+imgSubmit+'" name="Logon" onclick="login(username.value,password.value)">'); } if(imgReset == ""){ document.write('<input type="reset" value="Reset" name="Reset">'); } else { document.write('<input type="image" src="'+imgReset+'" name="Reset" onclick="logon.reset();">'); } document.write('</p></td></tr></table></form>') ;
thank you



Bookmarks