Hi

I am going crazy on this. This is first time I tried to use JSON for
the data I need and I have a php function that generates the data.
While FF etc are showing the output the IE fails to go beyond the
$.each to iterate over the JSON array.

this is the data generated by PHP function

{"items":[{"col": "col1","id": 1,"mod_title" :
"yahoo_latest","mod_ct" : "0","mod_code": "http://rss

.news.yahoo.com/rss/topstories"},{"col": "col1","id": 2,"mod_title" :
"yahoo_business","mod_ct" : "0"

,"mod_code": "http://rss.news.yahoo.com/rss/business"},{"col":
"col2","id": 3,"mod_title" : "yahoo_world"

,"mod_ct" : "0","mod_code": "http://rss.news.yahoo.com/rss/world"},
{"col": "col2","id": 4,"mod_title"

 : "yahoo_entertainment","mod_ct" : "0","mod_code": "http://
rss.news.yahoo.com/rss/entertainment"},{"col"

: "col3","id": 24,"mod_title" : "bbc","mod_ct" : "6","mod_code":
"http://newsrss.bbc.co.uk/rss/newsonline_world_edition

/asia-pacific/rss.xml"}]}



and this is how I call $.JSON

$.getJSON("/aj_drdp.php",{doq:"getcol"},function(data){

                $.each(data.items, function(i,item){
                         alert("I am here");

                          . . . . . .
                })
})


I don't get it. Seems like something basic I am unaware of with JSON
but even after searching for hours I have not been able to show the
data in IE.

The alert also does not come up in IE which means it is not parsing
the JSON to begin with. I have checked the JSON data again and again
and it does not have any error. I even tried to use some other JSON
data to see it it works but nope. Seems like IE does not like the data
generated with PHP but how is that possible.

Anyways I am totally out of sanity over it. Can please someone show me
some light?

thanks
Vik

Reply via email to