I am returning xmlhttprequest and am trying to access xmlhttprequest.responseText
I can use console.log and see the value of xmlhttprequest.state, but when I try to see the value of xmlhttprequest.responseText nothing comes up. Here is the responseText I get when I log the xmlhttprequest object.
{"name":"05571C-83E2A2-D4F3F0-6D7EE3-58A5F6-606843_2009-1.jpg",
"size":54823,
"type":"application\/octet-stream",
"url":"\/admin\/..\/uploads\/05571C-83E2A2-D4F3F0-6D7EE3-58A5F6-606843_2009-1.jpg",
"large_url":"\/admin\/..\/uploads\/large\/05571C-83E2A2-D4F3F0-6D7EE3-58A5F6-606843_2009-1.jpg",
"medium_url":"\/admin\/..\/uploads\/medium\/05571C-83E2A2D4F3F0-6D7EE3-58A5F6-606843-2009-1.jpg",
"thumbnail_url":"\/admin\/..\/uploads\/thumbs\/05571C-83E2A2-D4F3F0-6D7EE3-58A5F6-606843-2009-1.jpg"}"
I am simply trying to get this data so I can parse it with jquery.
Any ides?
It’s returning JSON. Try using jQuery’s getJSON() like this example: