Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

problem using Jeditable + ajaxUpload

I managed to use jEditable selects, inputs and textareas quite easily, but I have problems with uploading files :

I can't manage to send $_POST values along with the $_FILES values, and no extra data is passed through submitdata...

Here is my code :

$(".photo").editable("class/save.php",
{
    indicator : "<img src='img/indicator.gif'>",
    type      : 'ajaxupload',
    submit    : 'Envoyer',
    cancel    : 'Annuler',
    tooltip   : "Cliquer pour modifier...",
    submitdata : {row: "photo"}
});

When I do a print_r($GLOBALS);, $_GET and $_POST arrays are empty...

Did I miss something ?

Thank you

like image 511
arnaud Avatar asked Dec 01 '25 16:12

arnaud


1 Answers

The jeditable.ajaxupload plugin does not submit the 'submitdata' setting's.

I did some modification to the plugin to include submitdata and also the element's id in the submission (through querystring). You have to use $_GET to get the extra data.

Here is the link : https://github.com/tuupola/jquery_jeditable/pull/38/files

like image 93
Alyasa' Avatar answered Dec 04 '25 13:12

Alyasa'



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!