struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nagabrahmam <>
Subject userdefined client-side validations in struts
Date Wed, 22 Mar 2006 05:34:23 GMT
How to use our own JAVASCRIPT tags on client side in struts-framework?
ie., how can i use userdefined validations on client side in struts?
i hava created a jsp page like this but it was not working.

<%@ taglib uri="/tags/struts-html" prefix="html" %>
	<script language="JavaScript" src="script.js">
	<title>Hello UserRegistration</title></head>
		<bean:message key="errors.required" arg0="userName" >
		<html:form  action=""  onsubmit="return checkLogin(); ">
			UserName<html:text property="userName" /><br>
			PassWord<html:password property="pwd1"/><br>
			Confirmp<html:password property="pwd2" /><br>
			Address <html:text property="address" /><br>
			<html:submit property="submit" /><br>
function checkLogin()
   if(document.form1.userName.value == 0)
         alert("please enter the UserName");
Posted via Jive Forums

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message