0

I want to update table when any option is selected from select box. I have given click event. It’s working fine in every browser except chrome.

I have tried many solutions from here, but None work for me.

      $('.staty').click(function(){

        var imids = this.id;
        var ts=this.value;

        var con = confirm("Do you want to change the status?");
        if(con == true){
            ajax_img_edit('deletefiles.php', 'pesto=patos&sat_id='+imids + '&juggu=' + ts);

        }
    });
          });  
          function ajax_img_edit(url, data) {
    var a = $.ajax ({
        type        :   "post",
        data        :   data,
        url         :   url,
        cache       :   false,
        dataType    :   "html",
        async       :   false
    });
    return a.responseText;
}

          </script>
Alley
  • 17
  • 1
  • 1
  • 4
  • Please post a [mcve] without any PHP which is irrelevant to your issue. Click `<>` and post a proper snippet – mplungjan Oct 22 '17 at 17:00
  • Also don’t return the response but process it when it returns, then you can remove the async false very poor coding practice – mplungjan Oct 22 '17 at 17:51
  • Thank you sir,I will try to improve my code.Am not an expert developer.Could you please suggest me a solution for my problem. – Alley Oct 23 '17 at 05:55
  • Please put the rendered HTML back. The use the on change of the select, not the click of an option – mplungjan Oct 23 '17 at 05:57
  • I have tried onchange its not working. – Alley Oct 24 '17 at 06:44

0 Answers0