I'm currently getting the error Object #<Object> has no method 'toUpperCase'
before the POST request is made, so I would like and appreciate a lot your help! Thanks
function ajaxeo(url, data, method){
$.ajax({
url: url,
type: method,
data: data,
success: function(response){
alert(response);
}
});
}
function cambio(ID, newValue){
ajaxeo("includes/php/ajax/changeProvider.php?oldID="+ID, "post", {"newVal": newValue});
}
var editable = $('div[contentEditable][dataAjax]');
for (var i=0, len = editable.length; i<len; i++){
editable[i].setAttribute('data-orig',editable[i].innerHTML);
editable[i].onblur = function(){
if (this.innerHTML == $(this).attr('data-orig')) {
// no change
}
else {
// change has happened, store new value
$(this).attr('data-orig', $(this).html())
cambio($(this).attr('dataId'), $(this).html());
}
};
}