tags:

views:

21

answers:

1

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.responseText 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" ?

A: 

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

sushil bharwani