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
  • 6 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

Related Questions

This script is getting Microsoft JScript runtime error: Object expected on If (out_params.bGranted) line.
This issue is that i am getting the error, Microsoft JScript runtime error: Object
I am getting this error when I click my submit button Microsoft JScript runtime
I have an error Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to
I'm getting the error Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Error executing child request for
I am getting the following error: Microsoft JScript runtime error: 'Sys' is undefined While
Error Detail: Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the
I am getting a Microsoft JScript runtime error: 'Sys' is undefined error on one
When i am running the application,i got an error as follows: Microsoft JScript runtime
hi folks I use jquery and it gives me error : Microsoft JScript runtime

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.