I am having some problems with the call, the ajax "get" returns no
response, even though I know the form validation should be failing.
My ajax call looks like this:


        var url= "./checkValid.do";
        $.ajax({
                type    : "GET",
                cache   : false,
                dataType: "json",
                url      url,
                data    : 
$(this).serialize()+'&struts.enableJSONValidation=true&struts.validateOnly=true',
                success: function(data, textStatus, XMLHttpRequest) {
                        // do something here
                        alert(textStatus);
                }
        });


My action looks like this:
          <action name="checkValid" class="actionclass">
            <result type="json">
                <param name="root">jsonData</param>
            </result>
          </action>

Am I missing something?

On Fri, Apr 30, 2010 at 1:59 PM, Cimballi <cimballi.cimba...@gmail.com> wrote:
> Of course it can be done with JQuery and I recommend using JSON too.
> You call the action via Ajax and you get the JSON result and display it.
>
> Cimballi
>
>
> On Fri, Apr 30, 2010 at 1:36 PM, Ozu Natsu <ozu.na...@gmail.com> wrote:
>> Is it possible to fire the struts 2 validation without performing a
>> submit?  I realize that this could be done via ajax, but I am already
>> committed to use another JS framework (not dojo, dwr or prototype) .
>> I'd like to fire the validation and get the form validation messages
>> back if any to be displayed on the page, as happens when the
>> validation is fired from a submit -- but without performing the
>> submit...
>>
>> Possible?  Stupid question?  Can it be done with jquery?
>>
>> Thank you in advance to any reply.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> Cimballi
> JAVA J2EE Freelance
> http://cimballi.elance.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to