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

  • SEARCH
  • Home
  • 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 3439476
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:18:54+00:00 2026-05-18T08:18:54+00:00

I have Chrome 7.0 and am trying to access fields of a global object.

  • 0

I have Chrome 7.0 and am trying to access fields of a global object. The code is working perfectly in Firefox and IE, but Chrome’s debugger isn’t helping me get anywhere. I tried Safari and it’s also having trouble.

I can get the value of timer, but when I access status through the console I get "[object Object]". status.completedJobs returns undefined even after status = $.parseJSON(msg.d); (json string is valid).

I’m not sure what to do after this. Calling $.parseJSON(msg.d); from console works and I’m able to view the object’s fields with the debugger. How do I get the status Object properly assigned and globally accessible?

Here’s my code:

//Object that holds result of AJAX request
var status = new Object();
//Refresh timer variables
var timer;
var timer_is_on = 0;

$(document).ready(function() {
    update();
    doTimer();
});

/**
 * Performs the AJAX request and updates the page
 */
function update() {
    $.ajax({
        type: "POST",
        url: "Default.aspx/getStatus",
        data: "{}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            if (msg) {
                try {
                    status = $.parseJSON(msg.d);
                } catch (e) {
                    console.log(e);
                }
                updateProgressBar();
            }
        }
    });
}

function updateProgressBar() {
    var percent = Math.round(status.completedJobs / status.numJobs * 100);
    $('#progressPercentage').text(percent + '%');
    $('#progressbar').progressbar({
        value: percent
    });
}

/**
 * Used to initialize the timer.
 */
function doTimer() {
    if (!timer_is_on) {
        timer_is_on = 1;
        timedCount();
    }
}

/**
 * Executed on every time interval.
 */
function timedCount() {
    update();
    timer = setTimeout("timedCount()", 3000);
}
  • 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-18T08:18:54+00:00Added an answer on May 18, 2026 at 8:18 am

    Try using another name than status, there is a predefined member of window(window is the global object in browser-based JS) called “status”. It also would be good if you assign the global variable to the window-object to avoid conflicts if there exists a variable in the current (not global) scope with the same name:

    window['statusVar'] = $.parseJSON(msg.d);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built the UI for my Google Chrome Extension, but I am trying
Using browser firefox and chrome I have an input file element. <input type='file' id='tempFileInput'
As I understand it, a Panel isn't meant to have any visible chrome. The
I have a problem with my google chrome and firefox (the only 2 browsers
I am trying to build my first chrome extension, I have a problem where
I have a windows machine trying to access the IIS server that has windows
I am trying to create a redirect after visitor inputs an access code for
Problem I am trying to access developers.facebook.com with a user account , but I
Can Chrome's last inspected elements be access with javascript? Background, trying to integrate this
I'm trying to write myself a chrome extension, and I have the following lines

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.