Problem empting versuchen Eingabe nach AJAX-Aufruf zu löschen:Uncaught Typeerror: this.reset ist keine Funktion - Fehlereingang nach Ajax-Aufruf
$.ajax({
type: "POST",
url: "river_flow.php",
data:
{ username: $("#username").val(),
idv:$("#idv").val(),
comment: $("#comment").val()},
cache: false,
success: function(data){ $(".read_comment").after(data); this.reset();
alert('success');
}})
return false;
sagt: Uncaught Typeerror: this.reset keine Funktion ist. Hier ist meine Form:
<div class='post_comment'>
<input type="hidden" id="username" value="<?php echo $_SESSION['username'] ?>" name='username'/>
<input type="hidden" id="idv" value="<?php echo $row['idv']; ?>" name='idv'/>
<input type='text' class="input_comment comment" value='' placeholder='What do you think?' name='comment' id='comment' />
<input type='submit' name='comment_submit' class="comment_submit comm" id='comm'/>
</div>
ich dies auch versucht haben:
$(this).find('.comment').reset();
Doesnt Arbeit. Kann nicht herausfinden warum. Ich habe Klasse gesetzt, um zu kommentieren und nannte es zusammen mit Javascript-Funktion zurückgesetzt und es sagt, Reset ist keine Funktion. Gleiches mit this.reset. Brauche Hilfe, bitte.
'console.log (this);', was sehen Sie? Weil ich sicher bin, dass es nicht das ist, was Sie erwarten. –