Hallo Leute,
irgendwie peinlich, aber ich komm nicht weiter.
Ich bau mir mit JS ein Json zusammen:
{"anzahl":"1","id":"33","produkt":"Pizza1"},{"anzahl":"5","id":"34","produkt":"Pizza2"}
oder auch
[{"anzahl":"1","id":"33","produkt":"Pizza1"},{"anzahl":"5","id":"34","produkt":"Pizza2"}]
mit
$.ajax({
url : 'test.php',
data : feld, // post the created object here
type : 'GET',
dataType : 'json',
success : function(data) { alert(data); },
error: function (jqXHR, textStatus, errorThrown) {
alert(jqXHR +textStatus+ errorThrown ); }
});
Bekommen tu ich den Erroralert:
[object XMLHttpRequest]parsererrorInvalid JSON: test
mit test.php
<?php echo "test"; ?>
Vielleicht spielt die Jquery Version 1.4.1 eine Rolle.
( Unter anderen Versionen fuzt 'live' nicht. Mit 'on' bekomm ich die in den Warenkorb angefügten Elemente, nicht angesprochen. Mit live klappts ganz gut, nur halt unter 1.4.1.).
Kann mir jemand helfen?
Viele Grüße aus LA
--
ralphi
ralphi