Is it actually accessing the file correctly? I'd say provide a test case or check yourself with Firebug.
On Aug 18, 6:00 am, Jon Sidnell <[EMAIL PROTECTED]> wrote: > Hi > > I'm trying to get some JSON content using the $.getJSON function, but > it just won't work!! > > I started out using ASP.NET to generate a load of JSON, but decided to > create a simple text file with a JSON string in it instead. > > Here's my JavaScript: > > $.getJSON("/test.txt", function(data) { > alert("I got the stuff"); > }); > > $("#msg").ajaxError(function(event, request, settings, error) { > $(this).append("<p>" + error + "</p>"); > }); > > And my test.txt file contains: > > { "offer": { > "id": 2, > "title": "animals could talk", > "image": "_blank.gif" > } > } > > Is there anything really obvious I'm doing wrong? > > Thanks > Jon