A common ajax response contains a message and a result, two distinct information that must be displayed in different containers. data-output-json is made for this case: list your json attributes inside dom data-output-json, and for each one, add a corresponding data-<json key> whose values are jquery containers. For more details, watch out the Complete HTML and the PHP Handler tabs.