Wenn ich über Ajax poste, bekomme ich manchmal zusätzliche Zeichen geschrieben zum Beispiel. Wenn der Text obwohl Ajax geben yo _POST ein php $ ich am Ende immer:jQuery posts Fehlertext beim Posten mit Ajax
Das ist mein messagejQuery127638276487364873268_374632874687326487
99% der Zeit Beiträge jedoch in Ordnung passieren ... Ich bin nicht sicher, wie man erfassen und entfernen Sie diesen Fehler, da dies nur gelegentlich der Fall ist.
// this is the ajax that we need to post the footprint to the wall.
$('#submitbutton').click(function() {
var footPrint = $('#footPrint').val();
var goUserId = '1';
$.ajax({
type: 'POST',
url: '/scripts/ajax-ProfileObjects.php',
data: 'do=leave_footprint&footPrint=' + footPrint + '&ref=' + goUserId + '&json=1',
dataType: 'json',
success: function(data){
var textError = data.error;
var textAction = data.action;
var textList = data.list;
if (textError == 'post_twice' || textError =='footprint_empty' || textError == 'login_req') {
// display the error.
} else {
// lets fade out the item and update the page.
}
});
return false; });
Sie müssen Ihren Code oder ein Beispiel veröffentlichen, um eine Antwort zu erhalten. – j08691