I am working on asp.net website in which i am getting data by using jquery ajax.
here is my code.
function PostSubChapter(qbt_id) {
debugger;
var v1 = 'qbt_id:' + qbt_id;
$.ajax(
{
type: "POST",
url: '<%= ResolveUrl("~/QuestionBankSubChapters.aspx/GetChapters") %>',
data: '{' + v1 + '}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
if (result.status === "OK") {
alert('Comment posted');
}
else {
fnDisplaySubChapter(result, qbt_id);
}
},
error: function (req, status, error) {
alert("Sorry! Post failed due to error");
}
});
}
and my web method is
[WebMethod]
public static List<BO.QuestionBankSubChapters> GetChapters(int qbt_id)
{
BAL.QuestionBankSubChapters oQBTSC = new BAL.QuestionBankSubChapters();
List<BO.QuestionBankSubChapters> lstQBTSC = oQBTSC.getQuestionBankSubChapters(qbt_id);
return lstQBTSC;
}
These is working very fine in chrome an IE but not showing any result in case of FireFox
call is going properly to web method but at the time of getting result from it is calling Error function.It has to call another function present in sucess function but not calling that function.
Pls help me these.
for your understanding here i am mentioning the link of the website
Link is : "http://skillgun.com/Home.aspx"
Open these in Fire fox and chrome both then Click on Arithmetic then it will display 2nd screen.
Just see the o/p in both the browser you'll understand. In chrome its working properly but in Firefox its not.I am not getting understand what is the reason behind these.Sample code already i mentioned above.
I am using jquery-1.8.3.min.js for getting the result.The callback function is working fine in chrome and IE but not working in FF
Please help me....