0

I am creating ajax model update request, after this I want to refresh my compacted variable with ajax response. I need to do these tasks without page reload. If anyone have any ideas please share with me.

My code:

success: function(result) {
    console.log(result);
    var abc = JSON.stringify(result);
    Cookies.set('clients', abc, 10);
    $('#cookie').html(Cookies.get("clients"));
    var abc2 = $('#cookie').text();
<?php $client1 = $_COOKIE['clients']?>

I have been trying to do it with cookies, but as I know, to get recent cookies need reload page.

barbsan
  • 3,418
  • 11
  • 21
  • 28
Aurimas_12
  • 109
  • 1
  • 2
  • 13
  • Missing some codes here for us to help you (controller's method, HTML, ...). I guess cookies are not needed to do what you want. – Kévin Bibollet May 28 '19 at 06:49
  • My controllers method returns json data of controllers object with mysql data. After updating column it only makes change in mysql data and doesnt refresh my controller variable, so it affects data in modals and input tags – Aurimas_12 May 28 '19 at 09:08

0 Answers0