Iranna G

Iranna G

  • NA
  • 6
  • 2.5k

Need To Click F5 To Get Data When Using jquery ajax call

Jan 29 2014 4:12 AM
Hi All,
I am using jquery-1.10.2.js SharePoint 2013 ,Visual webpart.
I have created wcf service which gives response  in json format in sharepoint and trying to get data by using jquery ajax call  in Visual Webpart
$(document).ready(function () {
$.ajax({
type: "GET",
cache: false, url:"http://siturl/SampleService.svc/EmpInfo"),
contentType: "application/json; charset=utf-8",
dataType: "json",
processData: true,
error: function (jqXHR, textStatus, errorThrown) {
alert("Error occured - " + errorThrown)
},
success: function (data) {
//looping the data
}
});
});
Issue:If user select some value and click on save button the data getting stored in database but not showing in the UI.
If i click f5 the data will refresh on UI.Some times i need to click on f5 2 to 3 times then only the data will refresh.
When i deploy solution,i am not able to see the data.If i refresh again(Cliking f5),then the data will come.Some time i need to click 2 to 3 times on f5.The data is coming correctly but it requires additonal click of f5 to show on the visual webaprt.
 
Please help me
Regards,
Veeresh G

Answers (4)