Microsoft JScript runtime error: Object doesn't support this property or method

Posted by Johnseelan under jQuery on 8/30/2012 | Points: 10 | Views : 3641 | Status : [Member] | Replies : 3
$(document).ready(function () {
$("#btnSubmit").click(function (e) {
debugger;
$.ajax({
async: false,
type: 'POST',
url: "@Url.Content("~/Customer/Create")",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: $('form').serializeArray()
}).success(function (status) {
if(response.Type==1) {
alert("hai");
}
});
e.preventDefault();
});

});

the above code is give "Microsoft JScript runtime error: Object doesn't support this property or method"
error. please any one help me, it is urgent

and Give me good site srl or ebook url to learn jquery from basic. i want to work with asp.net mvc3 with jquery.




Responses

Posted by: Vuyiswamb on: 8/30/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Which Line in this do you get an Error ?

Thank you for posting at Dotnetfunda
[Administrator]

Johnseelan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Johnseelan on: 8/30/2012 [Member] Starter | Points: 25

Up
0
Down
.success(function (status) {
if(response.Type==1) {
alert("hai");
}
});

after inserted the value the alert function not coming instead i got that error.

Johnseelan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 8/30/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
If you put a breakpoint on

if(response.Type==1) 


what is the value of "response.Type"


Thank you for posting at Dotnetfunda
[Administrator]

Johnseelan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response