Hi All
Actually I want to do Password Encryption functionality.
For that I have 1 Java script file.On Java script validation I want to pass password value from client side to server side as,
<head>
<script type="text/javascript" language="JavaScript" src="MyJSFile.js">
function submitForm(element)
{
var me = document.getElementById(passwd);
If(!me)
{
alert('Please enter Password);
}
else
{
Some password logic I will do here.
}
}
</head>
<f:view>
<BODY......
<h:form id="createUserForm">
<h:commandButton id="save" value="Save" action="saveactionMethod " onclick="submitForm(this)" />
<h:inputSecrete id="passwd"
value="#{createUsrFormBean.password}"/>
</h:form>
</body>
</f:view>
But the Java script code is not working.I mean If I put nothing in password textbox the alert is not firing.
My code is wrong ?
Thanks
Sandip