gangslab
3/9/2018 - 5:33 AM

AJAX error 체크

AJAX error 체크

	function more_desc(project_id)
    {
        $.ajax({
            type: "POST",
            url: "/VTAssist/admin/json/get_project_description.php",
            data: {
                project_id: project_id
            },
            async: true
        }).done(function(response) {
            var json_response = JSON.parse(response);
            if ("error" in json_response) {
                alert(json_response["error"].message);
                confirm_dialog.close();
                return;
            }

            //  if success
            if ("data" in json_response) {
                $("#desc_text").html(json_response["data"].description);

                desc_dialog.showModal();
            }

        });

    }