- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Problem trying to retrieve a json object
I’m having real trouble getting a successful response from this url.
I have tried a few other json urls to check my code and they work.
I’ve even run the json from my url in the [jsonlint](http://jsonlint.com/ “JSONLint”) website and it validates fine.
Can anyone help me.
I’ve tried so many variations of things but all with the same response.
$.getJSON( ‘http://arcgisweb.fife.gov.uk/Fife/Nearest/Street.asp?long=-2.8215&lat=56.1904&format=json&jsoncallback=?’, function(data){
if (data.stat==’ok’) {
console.log(data);
}else{
console.log(‘boo hoo’);
}
});
Are you getting ‘boo hoo’ to console log?
I’m not getting to the ‘boo hoo’ statement. I keep getting an invalid statement error.
Thanks #Mottie for the link but I’m still no clearer on where I’m going wrong.
decided to use coldfusion to retrieve my json object. I’m having no trouble that way and I’m pushed for time. Will try and work it out in the evening.