Nachdem ich mich nun mühsam an Ajax rantastete und nun auch alles geht, steh ich nun im tiefen Wald so ganz ohne Wegweiser.
Mein Quellcode:
Von der Update.php kommt ein var_dump($_POST) zurück.
Soweit so gut.
Leider ist das Ergebnis:
Was mich nun verzweifeln lässt ist, dass die Variabel quelle ja im Result funktioniert. Wieso wird sie dann nicht im $.post angewendet?
Hat jemand eine Idee?
Mein Quellcode:
HTML-Code:
<script> function ajaxFunction(quelle) { term = document.getElementById(quelle).value; $.post( "../test/update.php", {quelle: term}) .done(function( data ) { $("#result"+quelle).css("color", "#04B404"); $( "#result"+quelle ).text(quelle +" "+ data +" "); }); }; </script> <td><input name="Name" id="Name" type="text" value="<?=$userRow['user_name']?>" onChange = "ajaxFunction(this.name);" size="20" maxlength="15"></td><td id="resultName"></td> <td><input name="EMail" id="EMail" type="text" value="<?=$userRow['user_email']?>" onChange = "ajaxFunction(this.name);" size="40" maxlength="33"></td><td id="resultEMail"></td>
Soweit so gut.
Leider ist das Ergebnis:
Name array(1) { ["quelle"]=> string(11) "Inhalt Name" } gespeichert |
Hat jemand eine Idee?
Kommentar