questions
Hi...
wanted to ask 2 questions..
Question 1
<input type=text name=pass1>
<input type=text name=pass2>
How do i validate whether they are the same using javascript? is there any other way than using jsp/jstl
Question 2
How do i validate NRIC value through jsp/jstl?
thanks in advance^^
[352 byte] By [
blanketa] at [2007-11-27 5:32:31]

# 1
Javascript:
var n1 = document.getElementById("pass1");
var n2 = document.getElementById("pass2");
if (n1 == n2) {
alert("values are equal");
}
else {
alert("values are not equal");
}
JSP:
create pass1 and pass2 form bean string in your actionform class.
in your action class or jsp, get the form instance and then
if (myForm.getPass1.equals(myForm.getPass2)) {
}
you can use, <logic:equal and logic:notEqual jstl tags
I don't know, what is NRIC?>
skp71a at 2007-7-12 14:58:41 >
