Skip to content
Loading
  
  •   
  • Regards,
    Mukesh Nayak 
    +1
  • Mukesh Nayak
    0
    Hi Abhijeet,
     
    if i understand your question correctly you want to say that you have got a button in UI and on click event of that you are doing ajax call which in turn calling web api which is sending data in json. Now you are in client side code where you are doing ajax call you are getting data back.
    Now i want to konw whether you want to store that json data in client side variable or server side variable?
    Please feel free to rectify my understanding.
    Regards,
    Mukesh Nayak 
    0
  • 0
    Mukesh Nayak sir... I want to store that response in client side variable. whatever you understand is correct . now I want to store that response in client side variable.
     
    Now i uploaded my code . Please refer it and guide me according to my code.
     
    Thank you 
    0
  • 0
     
     
     
    -----------------This is my code. sir i have tried this. So it redirects window to url where api returns json response. 
    0
  • Mukesh Nayak
    0
    Hi ,
    I think in the code where you have mentioned 
    1. $("#btn").bind("click", function () {  
    2. var url = "http://104.211.243.204/?container=comedy-movies&blob=" + encodeURIComponent($("#itemList").val());  
    3. window.location.href = url;  
    4. });  
     change it to ajax call  such as 
    1. $("#btn").bind("click", function () {  
    2.             var apiurl = "http://104.211.243.204/?container=comedy-movies&blob=" + encodeURIComponent($("#itemList").val());  
    3.             var jsonResponse;  
    4.             $.ajax({  
    5.                 url: apiurl, success: function (result) {  
    6.                     jsonResponse = result;                     
    7.                 }  
    8.             });     
    9.         });   
     Regards,
    Mukesh 
    0