Parsing the response from a jQuery ajax form post
Posted
by GrahamB
on Stack Overflow
See other posts from Stack Overflow
or by GrahamB
Published on 2010-03-24T18:08:36Z
Indexed on
2010/03/24
18:13 UTC
Read the original article
Hit count: 286
I am successfully posting a form via ajax, using the following code;
$.post( "Page.do?source=ajax",
$("#Form").serialize(),
function(data){
}
The data response that comes back can be alert'd. I can see that it is the HTML of the entire form, having been submitted. But, I am having trouble accessing an element in that form which has come via ajax, ie
data.find('.Errors').html()
or
$('.Errors', data).html()
Do I need to somehow convert the text into a DOM which can then be parsed by jQuery?
© Stack Overflow or respective owner