NicolasCARPi / jquery_jeditable

jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.
https://jeditable.elabftw.net
MIT License
1.74k stars 458 forks source link

Save.php not launching #250

Closed kkaiser1952 closed 2 years ago

kkaiser1952 commented 2 years ago

This is the jeditable code I have as of today. The JSON file is created and displayed when I click in the appropriate cell. However the data never gets to the Save.php code, it never even opens that code.

var submitdata = {};
   $(".editfacility").click(function(){               
      var recordID = $(this).attr("id").split(':').pop();
         submitdata['recordID'] = recordID;
            console.log(submitdata); 
});

$(".editfacility").editable("save.php", {
     type         : "select",
     cancel     : "Cancel",
     placeholder: "",
     tootltip   : "Facility names, click to edit...",
     onblur    : "submit",
     submit   : "Save",
     style      : "inherit",
     loadtype  : "GET",
     loadurl     : "getListOfFacilities.php",
     loaddata  : submitdata,
});

I have quite a few cells being edited using Save.php and I can always tell by using echo that the data from jeditable is getting to it. But in this case its not, I suspect its a syntax issue a comma I missed a bracket or something but I've been over the code many times and don't see the issue. Any help spotting my problem would be greatly appreciated.

NicolasCARPi commented 2 years ago

Can you see the request in Network tab (press f12) ?

kkaiser1952 commented 2 years ago

I'm in FireFox the Network tab has a lot of stuff in it but i don't see anything about that cell or the requested change.

I can send a link with basic instructions if that would help to see it.

What should I look for in the Network tab?

kkaiser1952 commented 2 years ago

A box in red comes up and says: Paused on exception SyntaxError: Element.querySelectorAll: ':input:visible:enabled:first' is not a valid selector

kkaiser1952 commented 2 years ago

I moved to Safari to give this a try and it works. The change based on the selected item in the dropdown is saved to the table and its reproducible, with no errors showing in the logs or in Network. Why?

NicolasCARPi commented 2 years ago

Because Safari is a different browser.

You should try and fix the issue that Firefox is showing.

Also, on the Network tab, click the XHR button to only show the ajax requests. It will help filter out the noise.