We help IT Professionals succeed at work.

getting text out of jquery response

scm0sml
scm0sml asked
on
Hi,

I have the code below:
var x = $.ajax({
        type: "POST",
        url: "Index.aspx/GetUnitState",
        contentType: "application/json; charset=utf-8",
        data: '{course: "' + this.strFullID + '"}',
        dataType: "json",
        async: false
    });

    this.intState = x.responseText.d;

x.responseText = "{"d":"COMPLETED"}"

Whats the best way to get the value of d?

Thanks
Comment
Watch Question

Commented:
I got it working by doing:
this.intState = jQuery.parseJSON(x.responseText).d;

Author

Commented:
got it working