Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<input type="Submit" name="Submit" value="<%response.write dictLanguage.Item(Session("language")&"_customerauthenticateform_2")%>" ID="Submit1" onClick="if(checkForm()){document.register.submit()}" >
You should do something like this and the form will work without any onkeypress script code.
<form method="post" action="referer.asp?ty=lg" ID="FormReg" name="register"
>
<table width="100%" border="0" align="left" cellpadding="0" class="main" ID="Table1" >
<tr>
<td width="41%" rowspan="2" valign="top"></td>
<td width="22%" align=center><font color="#666666" face="Arial, Helvetica, sans-serif"><strong><br>
<%response.write dictLanguage.Item(Session("language")&"_customerauthenticateform_7")%></strong></font></td>
<td width="37%" align =right><br>
<%validate "username", "username"%><%textbox "username","", 20, "textbox"%> </td>
</td>
</tr>
<tr>
<td align=center><font color="#666666" face="Arial, Helvetica, sans-serif"><strong><%response.write dictLanguage.Item(Session("language")&"_customerauthenticateform_5")%></strong></font></td>
<td align =right valign="bottom"> <%validate "password", "required"%><%textbox "password","", 20, "password"%>
</td>
</tr>
<tr>
<td height="33" valign="top"> </td>
<td align=center> </td>
<td align =right valign="bottom">
<input type="Submit" name="Submit" value="<%response.write dictLanguage.Item(Session("language")&"_customerauthenticateform_2")%>" ID="Submit1">
</tr>
<tr>
<td colspan="3"><br></td>
</tr>
</table>
</form>
Using
function checkForm(frm)
{
if(frm.username.value=="")
{
alert("Username empty!")
frm.username.focus()
//cancel the submit.
return false
}
//if all ok submit form with returning true
return true;
}