jquery - Ajax prasererror on localhost but working fine on live server -


as title says, code works on live server not on localhost.

$.ajax({     type: 'post',     url: '/php/get.php',     data: {zipcode:zip },     datatype: 'json',     success: function(data){         //console.log(data);         if(data == ''){             var output="<h1 style='text-align:center;'>no search results</h1>";             document.getelementbyid("itemholder").innerhtml=output;         }else{             show(data);         }     },     error: function(xmlhttprequest, textstatus, errorthrown) {          alert("status: " + textstatus); alert("error: " + errorthrown);      } }); 

the error output getting is

status: parsererror  error: syntaxerror: unexpected token < 

this json parser new me, difference between localhost , live server causing fail?

////edit////

i checked php info , json enabled. database letters , numbers few of these symbols

: - _ . 

any more ideas?


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -