jquery - How to get updated data after refreshing a webpage -
jquery - How to get updated data after refreshing a webpage -
i'm working asp.net mvc3. have table
table info contains textbox user has come in value , submit. i'm using jquery ajax phone call submitting info end. on success function i'm using location.reload(true);
still after refreshing page shows cached value. i've set cache: false
the next jquery ajax call,
$.ajax({ type: "post", url: "/home/submitdata", data: values: h, cache:false, success: function (data) { alert('data has been submitted successfully'); location.reload(true); }, datatype: "json", traditional: true });
are sure $.ajax phone call functions properly? kind of info submitting: 'values : h'? mean send info json. syntax wrong. have form object, eg:
{ 'values' : h }
thats illustration if in case 'h' contains more values (array) should formerly express them json, too. there javascript functions transform array json- objects you.
so test $.ajax phone call , prove web console if error shown. utilize
console.log("....");
and also
console.dir(obj);
to show object tree.
jquery ajax reload browser-cache partial-page-refresh
Comments
Post a Comment