Skip to content

custom callback in serviceUrl #185

@Bazar6

Description

@Bazar6

I think a new option should be added so we can define the jsonp callback that is provided from our data source. Please see my question and answer here : http://stackoverflow.com/questions/23115997/using-devbridge-autocomplete-and-wunderground-autocomplete-api/23120630?noredirect=1#23120630

I had to modify the source to add

jsonp: 'cb',

inside:

that.currentRequest = $.ajax({
            url: serviceUrl,
            data: params,
            type: options.type,
that.currentRequest = $.ajax({
            url: serviceUrl,
            data: params,
            type: options.type,

I had to use a custom callback because that is how wunderground.com's api expects the callback to be defined, using "cb" not "callback" (docs here: http://www.wunderground.com/weather/api/d/docs?d=autocomplete-api).

I've modified my source to accommodate this particular case in accordance with his answer, and it worked perfectly, but I'd like this issue to be known to others who may be in my position, using a service that doesn't use the standard "callback" declaration.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions