Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My extjs store is
var myStore = new Ext.data.JsonStore({
autoLoad: true,
// Override default http proxy settings
proxy: new Ext.data.proxy.JsonP({
     type:'jsonp',
    url: path+'SelectoccurList',
    headers: {'Content-type': 'application/json'},
    reader:    {
        type: 'json',
        root: 'd'
    },

}),
   id: 'occurid',
// Fields declaration
fields: ['occurid','occured','headline','source','enteredby','bodyintro','webaddress','location1','location2','location3','location4','image','occurtypeid','occursubtypeid']
});


i get the error

SyntaxError: Unexpected token '<'

and return me
<?xml version="1.0" encoding="utf-8"?>
**SelectOccurList:-1Resource interpreted as Script but transferred with MIME type      text/xml.
SelectOccurList:1SyntaxError: Unexpected token '<'**
<ArrayOfOccurData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<OccurData>
   <occurid>22</occurid>
   <occured>2012-05-26T04:33:53-04:00</occured>
   <headline>headline</headline>
   <source>content</source>
 <enteredby />
 <bodyintro>content</bodyintro>
<webaddress />
<location1>29 -156.364</location1>
<location2 />
<location3 />
<location4 />
<image>url of iamge</image>
<occurtypeid>0</occurtypeid>
<occursubtypeid>0</occursubtypeid>
</OccurData>
<OccurData>
 <occurid>23</occurid>
 <occured>2012-05-26T15:41:52-04:00</occured>
 <headline>headline</headline>
 <source>test content</source>
 <enteredby />
 <bodyintro>test content</bodyintro>
 <webaddress />
 <location1>27.75974 -82.67853</location1>
 <location2 />
 <location3 />
 <location4 />
  <image>url of image</image>
<occurtypeid />
<occursubtypeid />
 </OccurData>
<OccurData>
  <occurid>24</occurid>
  <occured>test</occured>
  <headline />
  <source />
  <enteredby />
  <bodyintro />
  <webaddress />
  <location1 />
  <location2 />
  <location3 />
  <location4 />
  <image />
  <occurtypeid>0</occurtypeid>
  <occursubtypeid>0</occursubtypeid>
 </OccurData>
<OccurData>
 <occurid>25</occurid>
 <occured>Testing</occured>
 <headline>Testing 28 05 </headline>
 <source>Dummy</source>
 <enteredby>XYZ</enteredby>
 <bodyintro>This occur is dummy</bodyintro>
 <webaddress>http://</webaddress>
 <location1>5cd41415-5c60-4cbd-a6f3-05330b368a41</location1>
 <location2 />
 <location3 />
 <location4 />
 <image />
 <occurtypeid>0</occurtypeid>
 <occursubtypeid>0</occursubtypeid>
Posted

1 solution

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900