i still cant out put anything even with a simple alert(json); in firebug i see that ... below ... is returned
[ {"Value": 1, "Item": "Physics"}, {"Value": 2, "Item": "Chemistry"}, {"Value": 3, "Item": "Biology"} ]; On Mar 26, 5:34 pm, jakenoble <j...@jakenoblewebs.co.uk> wrote: > Shouldn't your JSON return values be double quoted"? > > [ {"Value": 1, "Item": "Physics"}, {"Value": 2, "Item": "Chemistry"}, > {"Value": 3, "Item": "Biology"} ]; > > On Mar 26, 9:16 am, iceangel89 <iceange...@gmail.com> wrote: > > > i am trying to load json. but it seems like its not working. nothing > > is alerted. supposed to be the case? > > > <script type="text/javascript"> > > $(function() { > > $.getJSON("data.js", function (json) { > > alert(json); > > });}); > > > </script> > > > data.js > > [ {Value: 1, Item: Physics}, {Value: 2, Item: Chemistry}, {Value: 3, > > Item: Biology} ];