2012-11-07 3 views
0
I'm trying to get some j son data from a local server using Senchatouch-2 app: 

나는 다음과 같은 메시지가 :XMLHttpRequest의은에서 아약스와 함께 URL을로드 할 수 없습니다 Senchatouch-2

load http://localhost:8084/Sencha/senchatest. Origin http://localhost:8084 is not allowed by Access-Control-Allow-Origin. 

Even If I launch my sencha app as an, I get this: 

    XMLHttpRequest cannot load http://localhost:8084/Sencha/senchatest.Origin null is not allowed by Access-Control-Allow-Origin 

The web service returns data. I try to catch the data items like this: 

proxy:{ 
      type: 'ajax', 
      method:'GET', 
      model:'List.model.Mainmodel', 
      url: 'http://localhost:8084/Sencha/senchatest', 

      reader: { 
       type: 'json', 
       rootProperty: 'data.firstName.lastName' 
       }} 

And I'm trying to get this structure: 
    {"data":[{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"}]} 

당신이 알아보기 왜 내가 갖는 // 동적 목록 이 오류?

감사합니다,

감사합니다 당신은 같은 기원 정책으로 고통 받고

답변

0

하는 서버를 통해 페이지를 가져하지

+0

@radha 당신을 했 파일 시스템을 통해로드했는지 확인 이것을 확인 하시겠습니까? – Oxi

관련 문제