i am using velocity template with spring MVC. can anyone help in doing client side validation in velocity template. i have attached the file here.
I tried out with
java script.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<h1>Manage Configuration</h1>
<form id="pageForm" commandName="pageVO" method="POST">
<table>
<tr>
<td>
#springFormSingleSelect("pageVO.managePage" $manageConfig 'onchange="getParam();" id="pageList"')
</td>
</tr>
<tr>
<!-- <td><input type="hidden" id="pgType" value="pageVO.pageType" /></td> -->
<td>#springFormHiddenInput("pageVO.pageType" 'id="pgType"') </td>
</tr>
<tr>
<!-- <td><input type="hidden" id="pgTypeFlag" value="pageVO.pageTypeFlag" /></td> -->
<td>#springFormHiddenInput("pageVO.pageTypeFlag" 'id="pgTypeFlag"') </td>
</tr>
</form>
</body>
<script type="text/javascript">
function getParam(){
document.getElementById('pgType').value = document.getElementById('pageList').value;
document.getElementById('pgTypeFlag').value = "true";
document.forms["pageForm"].submit();
}
</script>
</html>