i am very new to ajax .when a user post comment i want to diaplay immediately ie something like dani web quick reply please tell how do tat in ajax
You will need to call two functions in AJAX.
1. for inserting the comment in database and returning the last inserted id
2. For displaying the comment using the returned id.
but i am unable to call the function in a page which is returned by responseText.
start very simple. On the page that you are calling, just echo "hello world" and start there. If that doesn't work then post your ajax function(s). Otherwise, post the code on the page that you are calling and you ajax function(s).
see what i am doing:
first i call the comment page where comment form is designed, then on submit button another page will be called this is submit_comment.php, then on submit_comment, i want to load another function .. see the example i am doing here:
I have solved my problem myself ;) ....