im using this jquery function to do a ajax query:
$("#add").click(function() {
val1 = $('#add_lang_level').val();
val = $('#add_lang').val();
listitem_html = '<li>';
listitem_html += '<span id="lang_val">' + val + '</span> <strong>('+ val1 + '/100)</strong>';
$.ajax({ url: 'addremovelive.php', data: {addname: val,addlevel: val1}, type: 'post'});
listitem_html += '<a href="#" class="remove_lang"> <span class="label important">Remove</span></a>'
listitem_html += '</li>';
$('#langs').append(listitem_html);
});
I want to clear the content of some textfields after ajax query is complete, but dont know how. Thanks for any help!
you can do it this way, I have added anonymus function which will be invoked on success.