posted 20 years ago
Hi all,
Is it possible that i can assign the var value from the javascript to a java string variable???
<script>
function myfunction(value)
{
var password = value
}
//calling a method: checkuser(username,password);
the reason why i'm trying to this is coz i have a secure form, and i want the user to enter his password before he can submit the page.
I'm prompting the user to enter his password using javascript interactive dialog box.
The password that the user enter goes to the function myfunction(value) and it is this value that i want to supply to my java method.
Right now, i;m storing the value in a hidden field and submitting the page and then checking for validity, but it would be really cool if any one can help me out for cancelling the submit if wrong password is supplied.
All i want is how to pass the var value to java variable..!! Is it possible???
Thanxs in advance