0

Parse error Placefinder + jQuery

this is my simple function

function searchCity(val) {

vurl= "http://where.yahooapis.com/geocode?q=" + val + "&flags=J&appid=[my app id here]&callback=?";
$.getJSON(vurl, function(data){
console.log(data);
});

}

as you see is pretty simple... but i always receive an error in my console that reads (Chrome 10)

> Uncaught SyntaxError: Unexpected token
> :

or Parse error in Safari

i never had problem with google apis...do Yahoo require some of their libraries?

by
2 Replies
  • QUOTE (frab @ Mar 9 2011, 02:19 PM) <{POST_SNAPBACK}>
    this is my simple function

    function searchCity(val) {

    vurl= "http://where.yahooapis.com/geocode?q=" + val + "&flags=J&appid=[my app id here]&callback=?";
    $.getJSON(vurl, function(data){
    console.log(data);
    });

    }

    as you see is pretty simple... but i always receive an error in my console that reads (Chrome 10)

    > Uncaught SyntaxError: Unexpected token
    > :

    or Parse error in Safari

    i never had problem with google apis...do Yahoo require some of their libraries?


    PlaceFinder does not support the callback parameter, which confuses getJSON() into thinking the response is JSONP. Try removing the callback parameter.

    Eddie Babcock
    Yahoo! Geo Technologies
    0
  • QUOTE (Eddie B @ Mar 24 2011, 09:31 AM) <{POST_SNAPBACK}>
    PlaceFinder does not support the callback parameter, which confuses getJSON() into thinking the response is JSONP. Try removing the callback parameter.

    Eddie Babcock
    Yahoo! Geo Technologies


    how about adding callback support? i have been trying several ways to make a js call and load this info -- via yahoo's js libraries, jquery or native code -- and nothing seems to work. i do get a response if i type in the url, but the browser isn't able to decode anything when loading via js. i couldnt make even yahoo pipes work with this. could you get us some working example or get better support for placefinder please?

    many thanks
    0
This forum is locked.

Recent Posts

in PlaceFinder General Discussion