It works for me, the code is:

$.get('ajax_try.php',{data1: 'data1-text', data2: 'data2-text'},
        function(ajax_response){
                if(ajax_response=='ok'){
                        document.myForm.submit();
                }else{
                        $('#response_text_field').html(ajax_response);
                }
});

it returns 'ok' and submits the form if validation success on the ajax
page, else it returns text for each wrong element value. You can add
all data with;

var data[i] = $('#element_need_to_validate').val();

wish this helps.


On 13 Kasım, 23:10, Mayank <lone....@gmail.com> wrote:
> I have a page that uses a jquery $.get() method to retrieve content
> from a remote page.
>
> Ex
>
> $(function(){
>    $.get("http://domain.com/script.axd",{parameter1: "value1",
> parameter2: "value2"}, function(responseText){
>       alert(responseText);
>    });
>
> });
>
> The above script returns a null or empty string even though the called
> page is returning "True" or "False" as string string.
>
> Thanks for help in advance.

Reply via email to