3

After ajax call I get response that contains whole jsp page. How can I get only part of page or when I use SWF how can I get only result from evaluate block ? I have next ajax call in my js file:

var url = $('#srcCurrencySpace').attr('resource');
    $.ajax({
        type : "POST",
        url : url,
        cache:false,
        data: $('#form').serialize(),
        dataType: "text",
        success : function(response)
        {
            //Write you success logic here
            var newHtml = $('#srcCurrencySpace', response).html();
            $('#srcCurrencySpace').html(newHtml);
        },
        error : function(XMLHttpRequest, textStatus, errorThrown) 
        {
            //Write you error-handling logic here
            alert("error!");
        }
      });  

And this request go to:

<transition on="updateAmountSrcCurrency"  validate="false">
            <evaluate expression="retrieverFactory.getSrcCurrency(application)" result="flowScope.amountSrcCurrency"/>
            <render fragments="srcCurrencySpace"></render>
</transition> 

And finally snippet from my jsp:

<span id="srcCurrencySpace" resource="${updateURL}">
            <c:out value="${amountSrcCurrency}" default="LVL" />
</span> 
user2486291
  • 117
  • 1
  • 2
  • 11

0 Answers0