Monday, April 16, 2012

jQuery html(text) parsing via ajax

So I have a form which is sent to a python script via ajax. The python script is outputting an entire HTML page which includes content type doctype and all that.



Now I need to insert a part of the response text from the python script, a div element, into a div on the current page.



How do I parse the response text and strip away all of the unnecessary junks like doctype and header?



Thanks.





No comments:

Post a Comment