robertodecurnex / J50Npi

JSONP helper (pure JS)
http://robertodecurnex.github.com/J50Npi
56 stars 15 forks source link

ReferenceError: J50Npi is not defined #5

Open zetekla opened 7 years ago

zetekla commented 7 years ago

ReferenceError: J50Npi is not defined

J50Npi.getJSON(url, paramObject, function(data){
  console.warn('showSnPData', data);
  deferred.resolve(data);
});

URL: ...sp_x_9=amenityIds_f&sp_q_9=&callback=J50Npi.success:1

robertodecurnex commented 7 years ago

Hi @zetekla, you need to download the code into your web app public folder and include the JS on your HTML <head>.

You can try it out by using github's raw url instead. But you should not use that one on prod.

<script type="text/javascript" src="https://raw.githubusercontent.com/robertodecurnex/J50Npi/master/J50Npi.min.js"></script>