JQuery Json error: Object doesn't support this property or method
Posted
by Abu Hamzah
on Stack Overflow
See other posts from Stack Overflow
or by Abu Hamzah
Published on 2010-05-01T04:13:56Z
Indexed on
2010/05/01
4:17 UTC
Read the original article
Hit count: 1355
ERROR: Microsoft JScript runtime error: Object doesn't support this property or method
i am using WCF service to pull the data and its very simple for the purpose of test and it does returning me the data from wcf service but it fails on json2.js on line number 314-316
// We split the first stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace all backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, '@').
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
here is what i am doing
function serviceProxy(wjOrderServiceURL) {
var _I = this;
this.ServiceURL = wjOrderServiceURL;
// *** Call a wrapped object
this.invoke = function (options) {
// Default settings
var settings = {
serviceMethod: '',
data: null,
callback: null,
error: null,
type: "POST",
processData: false,
contentType: "application/json",
dataType: "text",
bare: false
};
if (options) {
$.extend(settings, options);
}
function GetFederalHolidays() {
$("#dContacts1").empty().html('Searching for Active Contacts...');
ContactServiceProxy.invoke({ serviceMethod: "Holidays",
callback: function (response) {
// ProcessActiveContacts1(response);
debugger
},
error: function (xhr, errorMsg, thrown) {
postErrorAndUnBlockUI(xhr, errorMsg, thrown);
}
});
}
any help what iam doing wrong? i try to change from dataType: text to json but i get the same error above.
© Stack Overflow or respective owner