I am using ajax post and am receiving data in the form of html. I need to split up the data and place pieces of the data all over the page. I built my response data to be someth
(Meder's response will work if you are comfortable with JSON, but regular expressions are probably a little easier and will work just as well for this.)
You will probably need to break up the response text using regular expressions. For example, if the response text is:
Hello there and Welcome
First timer visiting our site eh'
Then you could use some JavaScript like this:
var greeting = response_text.match(/.*
/);
var something = response_text.match(/.*
);
(This site is great for learning about regular expressions: http://gskinner.com/RegExr/)