How to do javascript validation in jsp
807569Sep 13 2006 — edited Sep 13 2006Hi everybody, i have done javascript validation in html but i dont know how to validate this jsp page.
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
<netui:html>
<head>
<netui:base/>
</head>
<netui:body>
<netui:form action="skippedAccessories">
<netui:hidden dataSource="actionForm.location.city" dataInput="${request.phoneAccessoriesForm.location.city}"/>
<netui:hidden dataSource="actionForm.location.state" dataInput="${request.phoneAccessoriesForm.location.state}"/>
<netui:hidden dataSource="actionForm.location.zip" dataInput="${request.phoneAccessoriesForm.location.zip}"/>
<netui:hidden dataSource="actionForm.plan.type" dataInput="${request.phoneAccessoriesForm.plan.type}"/>
<netui:hidden dataSource="actionForm.plan.id" dataInput="${request.phoneAccessoriesForm.plan.id}"/>
<netui:hidden dataSource="actionForm.plan.title" dataInput="${request.phoneAccessoriesForm.plan.title}"/>
<netui:hidden dataSource="actionForm.phone.modelID" dataInput="${request.phoneAccessoriesForm.phone.modelID}"/>
<netui:hidden dataSource="actionForm.phone.modelTitle" dataInput="${request.phoneAccessoriesForm.phone.modelTitle}"/>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="75%">
<tr>
<td align="center">
<netui-data:getData resultId="imageFileName" value="${request.phoneAccessoriesForm.imageFileName}"/>
<%
String imageFileName = (String) pageContext.getAttribute("imageFileName");
String img1 = request.getContextPath() + "/framework/skins/uscc/images/" + imageFileName;
System.out.println("psAccessories.jsp - img1 = " + img1);
%>
<netui:imageButton src="<%=img1%>" onKeyPress="submit"/>
</td>
</tr>
<tr>
<td align="center">
<%
String img2 = request.getContextPath() + "/framework/skins/uscc/images/continue.gif";
%> Select accessorries for your
<netui:label value="${request.phoneAccessoriesForm.phone.modelTitle}"/>
<br>
... or continue to checkout
<netui:imageButton src="<%=img2%>" onKeyPress="submit"/>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td bgcolor="#DAECFB">
Calling Plan Selected:
<netui:label value="${request.phoneAccessoriesForm.plan.title}"/>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</netui:form>
</netui:body>
</netui:html>
Can anybody help me