Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

password encryption functionality in JSF using Java Script

843842Oct 13 2006 — edited Oct 13 2006
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2006
Added on Oct 13 2006
1 comment
302 views