I tried to use WP_Ajax_Response class to respond Ajax request, but then some data wrap with [CDATA], and found that I just can’t use jQuery .text() to grab the data inside that… here is how i resolved this problem
<?xml ....?> <wp_ajax> ... <supplemental> <url><![CDATA[http://.....]]></url> </supplemental> </wp_ajax>
var xml = $.parseXML(response), imgURL = $(xml).find('supplemental url').text()
first use jQuery function to parse the response, then use jQuery .text() method to retrieve the data within CDATA.
My brothеr suggested I may like this blog.
Нe wаs οncе totally right.
This publish actuаlly madе my day.
You cann’t consider just how much time I had spent for this information! Thank you!
Also visit my website :: Online Payday Loan