2011-02-18 2 views
0

jQuery 1.5로 업그레이드하려고하면 모든 내 아약스가 중단됩니다. 나는 파이어 폭스를 실행하고있어 그것이 나에게 잘못된 라벨 내가 여기에 PHP의로 json_encode 을 사용하고의 javescript의 오류를 제공하는 것은 내 JSON 응답입니다jquery 1.5 아약스 요청은 오류가 있습니다

{ 
    "page": "1", 
    "total": 9651, 
    "rows": [ 
     { 
      "cell": [ 
       "story", 
       "51438", 
       "Skin color: Handy tool for teaching evolution", 
       "2011-02-20 08:30:26" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51435", 
       "Photosynthesis may hold key to production of cheap hydrogen for fuel", 
       "2011-02-19 10:00:03" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51478", 
       "Dancers, supporters ready for THON 2011 Feb. 18-20 at Jordan Center", 
       "2011-02-18 14:26:25" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51420", 
       "Juggling languages can build better brains", 
       "2011-02-18 13:30:44" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51434", 
       "Multiple approaches necessary to tackle world's food problems", 
       "2011-02-18 13:30:44" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51436", 
       "U.S. will no longer dominate science and research, study finds", 
       "2011-02-18 13:00:49" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51492", 
       "NPR to air interview with Penn State professor today (Feb. 18)", 
       "2011-02-18 11:20:10" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51437", 
       "Research universities play a major role in national security", 
       "2011-02-18 10:30:28" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51472", 
       "Paterno's necktie from 400th win nets $10,200 for Public Broadcasting", 
       "2011-02-18 09:20:52" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51363", 
       "PSU Extension offers free tax preparation help for low-income families", 
       "2011-02-18 01:32:04" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51477", 
       "Students set to produce complete THON coverage, including webcast", 
       "2011-02-17 15:24:47" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51385", 
       "The Medical Minute: Seasonal Affective Disorder", 
       "2011-02-17 12:27:30" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51345", 
       "Abington professor's new book exposes NBA betting scandal", 
       "2011-02-17 11:59:31" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51360", 
       "Student Stories: Statistical service internship makes it all add up", 
       "2011-02-17 11:12:32" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51453", 
       "Parking Office announces parking, transit changes related to THON", 
       "2011-02-17 11:02:46" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51444", 
       "Penn State's Lunar Lion team aims to land vehicle on moon by 2015", 
       "2011-02-17 08:17:12" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51427", 
       "Students flock to Spring Career Fair", 
       "2011-02-16 12:56:27" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51419", 
       "Ice Campaign receives $1 million gift from Paul and Nancy Silvis", 
       "2011-02-16 10:51:45" 
      ] 
     }, 
     { 
      "cell": [ 
       "story", 
       "51353", 
       "CarbonEARTH program facilitates science education, teaching", 
       "2011-02-15 15:59:04" 
      ] 
     } 
    ], 
    "messages": null 
} 

이 모든 JQuery와에 잘 작동 1.4.2

I 생각 업그레이 드를 기다려야 겠지만 다른 사람이 해결책을 찾았는지 확인하고 확인할 생각이 들었습니까?

답변

2

그래, 몇 가지 검색 후 정확한 해결책을 찾았으므로 jQuery Validate에 대해 bug report을 발견했습니다. 이 기사의 맨 아래에있는 validate 작성자는 도움을 받아 문제를 해결하는 포크 ​​버전을 제공합니다.

1

대부분의 아마이 스레드가 발생에 따라 jQuery.ajaxSetup({ jsonp: null, jsonpCallback: null});을 시도 할 수 http://code.jquery.com/jquery-git.js

에서 날짜 수정까지와 최신의 jQuery 버전을 찾을 수 있습니다 . 빠른 (권장하지 않음!) 수정 jQuery.ajaxSetup({ jsonp: null, jsonpCallback: null}); - 당신을 위해 작동한다면, 버전 1.5에서 "잘못된 라벨"문제 there is a discussion의 다른 옵션을 살펴보십시오.

+0

지금까지 제가 jQuery.validate.js를 꺼내 주면 문제가 해결되었습니다. 문제를 해결하자면 내가 지금 토론 한 내용을 살펴볼 것입니다. – mcgrailm

+0

수정 프로그램 사용의 단점은 무엇입니까? – mcgrailm

+0

@mcgrailm - 매시업 (mash-ups) 등을 위해 jsonp를 사용할 필요가있는 경우,이 과정이 진행됩니다. JSONP에 대한 추가 정보 : [http://www.ibm.com/developerworks/library/wa-aj-jsonp1/] –