Checkform
843836Jun 23 2005 — edited Jun 24 2005I am using struts and want to use javascript to validate the values put into the
form. so far its not working properly.
Thanks ahead.
<%@ taglib uri = "http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri = "http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri = "http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html>
<body>
<html:form action="/sendPhone" method="post">
<table>
<tr>
wfff wertyi5 <td >Name:</td>
<td><html:text property="phone"/></td>
</tr>
</table>
<input type="submit" onclick="javascript:doSomeFunction()"/>
</html:form>
<SCRIPT language="JavaScript" type="text/javascript">
function doSomeFunction(){
form[0].submit();//This line can be taken out and the form still submits I dont want this to happen.
}
</script>
</body>
</html>