Ajax submit code jquery end html response.

Ajax submit code jquery end html response.

  
Guys does anyone know how to make the server respond to a ajax request?

$.ajax({
          type: 'GET',
          data: 'Titulo='+titulo+'&Url='+location.pathname+location.search+'',
          url:'/SisproErp/SetRecentItens.aspx',
          success: function(retorno){
              //console.log(retorno);       
          },
          error: function(erro){
            console.log(erro);
          }      
    });

This is the example I want the variable success in <retorno> back som specific value on the server and I can handle the script.

Hi Paulo,

This old discussion shows you the way:
http://www.outsystems.com/forums/discussion/6427/create-an-clean-aspx-page/#Post16852

Imagining that you have a Boolean variable called Success your server answer could be something like this:
TextToBinaryData("{""success"":" + If(Success,"true","false") + "}")

I hope that helps!

Happy new year!
Davide :)
HI Davide,
                 Following on this, Is there a way to call screen function in the ajax url or does it need to be a screen with the download as mentioned in the list you provided ? 

Thanks.
Hi kota,

It needs to be a screen with download node. You cannot call a screen action directly.

Regards,
João Rosado
Thanks Joao. Just wanted to confirm it.