Hi Abin,
What is the value of $F('password'). ??
--
david
On 17 juil, 01:30, abinawale <[email protected]> wrote:
> Java Script function with prototype in it:
> -------------------------------------------------------------
> function strutsProtScriptAjaxLogin(){
>
> // Gets form value with id password
> var password = $F('password');
>
> // longinFormDiv is my div id
> new Ajax.Updater('loginFormDiv','/abinWebProject/strutsProtScript.do?
> password=' + password, {
> method:'get',
> onFailure: function(){
> $('loginFormDiv').update('An error
> occurred.');
> },
> onSuccess: function(response) {
> $('loginFormDiv').value =
> response.responseText;
> $('loginFormDiv').update( response.status );
> }
> });
>
> --> That password value is showing null in my Struts Action Class...
> --> I tried both :
>
> 1. new Ajax.Updater('loginFormDiv','/abinWebProject/
> strutsProtScript.do?password=' + password
> like shown above ( it doesn't have keyword parameter)
>
> and ,
>
> 2
> var password = 'password=' + $F('password');
> new Ajax.Updater('loginFormDiv','/abinWebProject/
> strutsProtScript.do
> ....
> parameters: password,
> .....
>
> But I could not get those values in struts action class...
>
> password = (String) request.getAttribute("password");
>
> it gives null to me..
>
> Any suggestion, corrections and opinions will be greatly appreciated.
>
> Thanks,
> Abin Awale
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---