when i put ajax on my code I send a group of variable via post but when i received the data it is in a obj.responseTe开发者_运维技巧xt ie TEXT format. say i have two files "form.php" and "index.php"
ajax is implemented in form.php while index.php returns the text. but my problem is index.php also generates a variable named "tarriff_count" i want to catch systematically and separately this variable,
Is there any systematic way to catch variable.also keep in mind "obj.responseText" is very complicated to get a variable from "preg_match" ?
Read about returning the result from AJAX request as XML or JSON. in variables like responseXML. You will find it easier to parse a XML or read a JSON format than that of a text string.
read this for more info:
http://www.quirksmode.org/blog/archives/2005/12/the_ajax_respon.html
精彩评论