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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:24:32+00:00 2026-05-15T08:24:32+00:00

This is driving me nuts! I’m getting some JSON from my server: {id262:{done:null,status:null,verfall:null,id:262,bid:20044,art:owner,uid:demo02,aktion:null,termin_datum:null,docid:null,gruppenid:null,news:newsstring,datum:11.06.2010,header:headerstring,for_uid:demo01}, id263:{done:null,status:pending,verfall:null,bid:20044,id:263,uid:demo02,art:foo,aktion:dosomething,termin_datum:11.06.2010,docid:null,gruppenid:null,datum:11.06.2010,news:newsstring,for_uid:demo01,header:headerstring},

  • 0

This is driving me nuts!

I’m getting some JSON from my server:


{"id262":{"done":null,"status":null,"verfall":null,"id":262,"bid":20044,"art":"owner","uid":"demo02","aktion":null,"termin_datum":null,"docid":null,"gruppenid":null,"news":"newsstring","datum":"11.06.2010","header":"headerstring","for_uid":"demo01"},

"id263":{"done":null,"status":"pending","verfall":null,"bid":20044,"id":263,"uid":"demo02","art":"foo","aktion":"dosomething","termin_datum":"11.06.2010","docid":null,"gruppenid":null,"datum":"11.06.2010","news":"newsstring","for_uid":"demo01","header":"headerstring"},

"id261":{"done":null,"status":null,"verfall":null,"id":261,"bid":20044,"art":"termin","uid":"demo02","aktion":null,"termin_datum":"25.06.2010","docid":null,"gruppenid":null,"news":"newsstring","datum":"11.06.2010","header":"headerstring","for_uid":null}}

This is how my JS looks like:

var user = 'demo02';

 new Ajax.Request('myscript.pl?someparameter=value', { method:'get', 
    onSuccess: function(transport){
        var db_json = transport.responseText.evalJSON(),
            propCount = 0,
            someArray1 = [],
            someArray2 = [],
            otherArray = [];

        //JSON DEBUG
        console.log('validated string:');
        console.log(transport.responseText.evalJSON(true));

        for(var prop in db_json) { 
        propCount++;
            if  ( (db_json[prop].art == 'foo') && (db_json[prop].for_uid == user) ) {
                someArray1.push(db_json[prop]);
            } else if( (db_json[prop].art == 'foo') && (db_json[prop].uid == user) ) {
                someArray2.push(db_json[prop]);
            } else if( db_json[prop].art == 'log' ) {
                otherArray.push(db_json[prop]);
            }
        }

        if(someArray1.length>0) {
            someArray1.map(function(el){
                $('someArray1target').innerHTML += el.done;
                //do more stuff
            });
        }

        if(someArray2.length>0) {
            someArray2.map(function(el){
                $('someArray2target').innerHTML += el.done;
                //do more stuff
            });
        }   

});

Sometimes, it works perfectly.

Sometimes, i get my JSON String (it appears in Firebug’s “answer”-tab), but it won’t log the JSON in console-log(). I’m not getting any errors and javascript is still working.

Next time after reloading, it might work, but it might not.

I cannot remotely imagine why this only happens sometimes!

  • 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-15T08:24:32+00:00Added an answer on May 15, 2026 at 8:24 am

    I found the answer. It makes me want to slam my head. My $(‘someArray1target’) div sometimes was not loaded yet.

    I was so focused in finding something weird in my JSON instead of searching for the more obvious, “standard” errors.

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

Sidebar

Related Questions

This is driving me nuts. I think it is because of some connection string
This has been driving me nuts. I keep getting the following exception System.InvalidOperationException: The
This is driving me nuts. Here is some HTML and CSS that I have
So this is driving me nuts. I need to pull my table rows from
I really need some help as this is driving me nuts! I need to
This is driving me nuts! I am getting the classic Can't connect to local
This is driving me nuts so any advice from fellow users would be welcome.
Ok, this is driving me nuts. I've done just about everything I can to
This is driving me nuts. I am using some 3rd-party code in a Windows
This is driving me nuts, I've tried everything for about a week. Hope some

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.