Closed kkaiser1952 closed 2 years ago
Hello Keith,
To pass extra parameters, use submitData
. See "Complete example" on https://jeditable.elabftw.net/.
Thanks for getting back to me Nicolas but after about 90 minutes of trying to figure this out I'm not making any headway. My new code looks like this;
var submitdata = {
$(document).on("click", ".c33 td", function(e) {
var data = $(this).attr('id');
alert(data);
});
};
var load_url = "getListOfFacilities.php";
// with JSON feed
$(".editfacility").editable("save.php", { // Facility
type : "select",
loadurl : load_url,
placeholder: "",
onblur: 'submit',
submit:"OK",
callback: function() {refresh();},
tooltip : "Facility Click to edit...",
style : "inherit",
});
I'm not getting the data from the clicked cell and I still don't see how it gets attached to the php program. The error from the above is "Uncaught SyntaxError: missing { before function body" Where am I going wrong? As usual I'm sure I'm making it more difficult than it should be.
Description
Below is my code, how do I pass a recordID to be used by the getListOfFacility.php program?
I've tried ; getListOfFacility.php?recordID=95633 but that doesn't seem to do it I get no return.
How to reproduce
It helps a lot if you can create a working example from this template: https://codepen.io/pen?template=pBxBXm
Expected result
Actual result
Environment
jQuery version: 3.5.1 Browser: Any OS: Any