Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

ajax url not able to append the correct data

$
0
0

I'm having issue with the dynamic url in the AJAX call. here is the function could you please suggest why its not working

function SF_UpdateParentContract() {
    var param = {
        UnitPrice: parseFloat($("#txtSaleAmt").val()) + parseFloat($("#txtTaxAmt").val())    
    }   
    var uPath = 'https:\\www.syz.com\token' + $("#OppLineId").val(); 
     alert($("#OppLineId").val()); $.ajax({
            type:"PATCH",
            beforeSend: function (request)
            {
                request.setRequestHeader("Authorization", "OAuth " +Token);
            },
            url: uPath,
            data:JSON.stringify(param),
            contentType:"application/json",
            processData: false,
            success: function(response) {                
            },
            error : function (data, errorThrown,status) {
                alert("Update failed");              
            },
            complete: function(xhr, statusText){    

            }
    });
}

Here I'm always getting uPath as https:\www.syz.com\token, I m not able to get the value of $("#OppLineId").val(); but in alert statement i'm able to see entire url which is https:\www.syz.com\token\A2323

any idea why ajax url is not considering this request and only making a call to the https:\www.syz.com\token url.

Thanks


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>