framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.13k stars 3.23k forks source link

parse error #856

Closed vespino closed 8 years ago

vespino commented 8 years ago

I'm moving an app I built from jQuery + jQuery Mobile to Framework7. The apps relies on a number of ajax requests to get json data from my server. When using the following code, I only get "parseerror" and nothing to work with.

$$.ajax({
  url: 'https://linktomywebsite.com/search',
  dataType: 'json',
  method: 'post',
  data: {
    latitude: localStorage.getItem('latitude'),
    longitude: localStorage.getItem('longitude'),
    distance: localStorage.getItem('distance'),
    mode: (localStorage.getItem('fietsroutes')=='ja' ? 'bicycling' : 'driving')
},
success: function(result, status, xhr) {
},
error: function(xhr, status) {
  console.log(status);
},
statusCode: {
    404: function(xhr) {
      console.log('leftpanel 404');
    }
  }
})

Any idea what could be causing this?

nolimits4web commented 8 years ago

Would be good to see actual server response

nolimits4web commented 8 years ago

Closing as no further response

192kb commented 7 years ago

finally got: error appears when success handler has an js error like function is not defined or so.

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.