[jQuery] Re: Looping JSON Data

2009-01-23 Thread blockedmind
it returns uncaught exception TypeError: Cannot read property 'length' of undefined error on google chrome's javascript debug window. let me put here the full scenario: var listsData=; function getLists() { $.ajax({ type: POST, url: actions.php, data:

[jQuery] Re: Looping JSON Data

2009-01-23 Thread blockedmind
well, i tried some options more... it turns out when i set ajax data type to text and convert it to json object using json.parser() it works just fine. ok then its solved but i should be able to pass data as a json object between two functions, right? On Jan 23, 4:24 pm, blockedmind

[jQuery] Re: Looping JSON Data

2009-01-23 Thread Eric Garside
JSON is Javascript Object Notation, and is really text only. Once you get JSON into javascript, it parses it into the object which it defines. From that point on, you're just passing a regular object around. There's technically no such thing as a JSON object. Also, try running this code: var

[jQuery] Re: Looping JSON Data

2009-01-21 Thread Ami
I think that this what R U searching for: var theList={list:[ {id:15,name:Testing,description:test,owner:1,active:1,featured:0,machinename:testing}, {id:16,name:Testing,description:test,owner:1,active:1,featured:0,machinename:testing},

[jQuery] Re: Looping JSON Data

2009-01-21 Thread seasoup
or... $.each(theList.list,function (a,b) { alert (b.id + ',' + b.name); }) On Jan 21, 7:30 pm, Ami aminad...@gmail.com wrote: I think that this what R U searching for: var theList={list:[ {id:15,name:Testing,description:test,owner:1,active:1,featured:0,machinename:testing},