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 9116035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:34:32+00:00 2026-06-17T04:34:32+00:00

I have the following code in my website: function GroupObject(GroupID, GroupColor, GroupName, CalendarID, UserEnable,

  • 0

I have the following code in my website:

function GroupObject(GroupID, GroupColor, GroupName, CalendarID, UserEnable, IrcChannel) {
  this.uid = GroupID;
  this.color = GroupColor;
  this.groupname = GroupName;
  this.calendarid = CalendarID;
  this.userenable = UserEnable;
  this.ircchannel = IrcChannel;
}

function GetGroupObjects(callback) {
  var GlobalDB = [];
  $.getJSON("Some Data From Google Docs",

  function (data) {

    $.each(data.feed.entry, function (i, entry) {
      GlobalDB.push(new GroupObject(entry.gsx$uid.$t,
        "000000",
      SanitizeInputText(entry.gsx$group.$t),
      SanitizeInputCalID(entry.gsx$calendarid.$t),
      true,

      SanitizeInputText(entry.gsx$ircchannel.$t)))
    });

    console.log(GlobalDB[0]);
    console.log(GlobalDB[0].color);
    callback(GlobalDB);
  });
};

All the parameters of the newly created GlobalDB are correct with the only exception of the parameter “color”. console.log(GlobalDB[0]) returns:

GroupObject
calendarid: "CalOfTNG"
color: "AB8B00"
groupname: "Austin TNG"
ircchannel: "AustinTNG"
uid: "TNG"
userenable: true
__proto__: GroupObject

It brings the same value for color “AB8B00” in both Chrome and Firefox. Any idea why? From the code above it should be 0. console.log(GlobalDB[0].color) does returns 000000. But when
I use GlobalDB when returning from the callback I get again AB8B00.

user enable, on the other hand works just fine. I just cannot find what is causignt he problem with the parameter .color as it fails in both Chrome and Firefox.

Thanks in advance.

  • 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-06-17T04:34:33+00:00Added an answer on June 17, 2026 at 4:34 am

    You seem to be subject to a console.log problem I have experienced often: you don’t see the object exactly as it is when logged but as it is later, because the browser doesn’t deep clone it immediately when you log but just stores its reference.

    This effect doesn’t affect primitive, like strings, that’s why the color appears initially fine when you log GlobalDB[0].color.

    The color is “000000” when you log it. It changes after, probably when you call callback(GlobalDB).

    See also this related question (and answer).

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

Sidebar

Related Questions

In asp.net website, inside .aspx i have following code <script type=text/javascript> function callme(option) {
I have the following jQuery Code: $(#menu span).click(function() { var url = this.getAttribute(data-url); var
I have the following code: String website = http://www.somewebsite.com/; Document doc = Jsoup.connect(website).get(); Elements
I have a internal website hosted on IIS. I added the following meta code
I have the following code on my website, which basically checks to see if
I have the following code, which is a modified version from MSDN's website, to
I have the following code: function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(start,showError); } else{
I have the following code to play audio on my website. The problem is
I have the following code for my ad system: function showandhide() { if ($('.showandhide').html()
I have used the following code to use FB Like on my website...but clicking

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.