Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 789521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:32:14+00:00 2026-05-14T21:32:14+00:00

ERROR: Microsoft JScript runtime error: Object doesn’t support this property or method here is

  • 0

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

here is how the json2 is calling from:

   **var json = JSON2.stringify(settings.data);**

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

    // *** Generic Service Proxy class that can be used to 
// *** call JSON Services generically using jQuery
// *** Depends on JSON2 modified for MS Ajax usage
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);
        }

        // *** Convert input data into JSON - REQUIRES Json2.js
        var json = JSON2.stringify(settings.data);

        // *** The service endpoint URL
        var url = _I.ServiceURL + settings.serviceMethod;
      debugger
        $.ajax({
            url: url,
            data: json,
            type: settings.type,
            processData: settings.processData,
            contentType: settings.contentType,
            timeout: settings.timeout,
            error: settings.error,
            dataType: settings.dataType,
            success:
                    function (res) {
                        if (!settings.callback) { return; }

                        // *** Use json library so we can fix up MS AJAX dates
                        var result = JSON2.parse(res);
                        debugger
                        if (result.ExceptionDetail) {
                            OnPageError(result.Message);
                            return;
                        }

                        // *** Bare message IS result
                        if (settings.bare)
                        { settings.callback(result); return; }

                        //http://encosia.com/2009/07/21/simplify-calling-asp-net-ajax-services-from-jquery/
                        if (result.hasOwnProperty('d'))
                        { return settings.callback(result.d); }
                        else
                        { return result; }


                        // *** Wrapped message contains top level object node
                        // *** strip it off
                        //                        for (var property in result) {
                        //                            settings.callback(result[property]);
                        //                            break;
                        //                        }
                    }
        });
    };
}



 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);
            }
        });        
}

wcf is returning me simple string

  public List<string> Holidays()
        {
            List<string> s = new List<string>();
            s.Add("01/01/2010");
            s.Add("02/01/2010");
            s.Add("03/01/2010");
            s.Add("04/01/2010");
            s.Add("05/01/2010");
            return s;

        }

any help what iam doing wrong? i try to change from dataType: text to json but i get the same error above.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:32:15+00:00Added an answer on May 14, 2026 at 9:32 pm

    i figured out, the problem was that it was expecting an object (Holiday)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 515k
  • Answers 516k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If the window isn't opened by some JavaScript code from… May 16, 2026 at 6:41 pm
  • Editorial Team
    Editorial Team added an answer A nice question. Reality is the code required to send… May 16, 2026 at 6:41 pm
  • Editorial Team
    Editorial Team added an answer The simple detection would involve checking s[:1] == s[-1:] ==… May 16, 2026 at 6:41 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

*Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be
What I am trying to accomplish is using jQuery UI dialog method from my
I have a webpage that is giving me this error on a couple of
I have tried many things, but I'm still not getting this to work. Here's
So i am trying to call this function in my javascript but it gives
I am try to bind the dropdowmlist using jquery. But is showing some error.
I Have usercontrol and i registered the following javascript method in code behind :
I have been successful in querying a Microsoft Access 2003 database (.mdb file) and
From within a C# WinForms app I must execute a parameterized Stored Procedure on
I am trying this to make a select and it works just fine string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.