2014-02-12 4 views
0

이 코드는 Firefox에서 완벽하게 작동하지만 I.E 8.0에서 실행할 때 userPerm이 정의되지 않습니다.SP 서비스 - 크로스 브라우저 문제

<script type="text/javascript"> 
$(document).ready(function() { 

$(document).ready(function() { 

$().SPServices({ 
operation: "GetRolesAndPermissionsForCurrentUser", 
async: false, 

completefunc: function(xData, Status) { 

alert(xData.responseXML.xml); 

var userPerm = $(xData.responseXML).SPFilterNode("Permissions").attr("Value"); 
    alert("userPerm = " + userPerm); 
    var nonAdminP = (33554432 & userPerm) == 33554432; 
    alert("Non Admin Permissions == 33554432: " + nonAdminP); 
    var adminP = userPerm == 9223372036854775807; 
    alert("Admin Permissions: " + adminP); 




} 
}); 

}); 

}); 
</script> 

편집 : 파이어 폭스에서

http://i60.tinypic.com/33ufnt3.png

그러나

xData.responseText을 내가 즉에게서 얻는 반응 인쇄

이된다

http://i62.tinypic.com/205rid.png

내가 두 브라우저에서 직접 페이지에 액세스 할 때 내가 모든 권한을 가지고 ...

편집 2 :

그냥이 발견

http://support.microsoft.com/kb/896861

EDIT 3

피들러 응답 :

결과 P rotocol 호스트 URL 본문 캐싱 콘텐츠 형식 프로세스 설명 사용자 지정

1 200 HTTP sp-coll-bbs.our-company-ag.com /sites/000057/PropertyandSite/HealthSafety/Assets/SitRight.aspx 23,698 개인, 연령 = 0; 만료 : 2014 년 1 월 29 일 수요일 08:00:51 GMT text/html; charset = utf-8 iexplore : 6064
2 304 HTTP sp-coll-bbs.our-company-ag.com /sites/000057/SiteAssets/title.css 0 private, max-age = 0; 만료일 : 2014 년 1 월 29 일 수요일 08:00:52 GMT iexplore : 6064
3 200 HTTP code.jquery.com /jquery-1.9.1.js 268,503 max-age = 315360000; 만료일 : 2015 년 12 월 31 일 23:55:55 GMT 애플리케이션/x-javascript; charset = utf-8 iexplore : 6064
4 304 HTTP 개인 정보, 개인 정보, -age = 0; 만료일 : 2014 년 1 월 29 일 수요일 08:00:52 GMT iexplore : 6064
5 200 HTTP code.jquery.com /ui/1.10.4/jquery-ui.js 436,883 max-age = 315360000; 만료일 : 2015 년 12 월 31 일 23:55:55 GMT 애플리케이션/x-javascript; charset = utf-8 iexplore : 6064
6 200 HTTP code.jquery.com /ui/1.10.4/themes/smoothness/jquery-ui.css 32,042 max-age = 315360000; 만료일 : 2015 년 12 월 31 일 23:55:55 GMT 텍스트/CSS iexplore : 6064
7 304 HTTP sp-coll-bbs.our-company-ag.com /sites/000057/SiteAssets/jquery.SPServices-0.7. 0.min.js 0 개인, 최대 연령 = 0; 만료 : 2014 년 1 월 29 일 수요일 08:00:52 GMT iexplore : 6064
8 304 HTTP sp-coll-bbs.our-company-ag.com /sites/000057/SiteAssets/default/CP_small.PNG 0 private, max -age = 0; 만료 : 2014 년 1 월 29 일 수요일 08:00:52 GMT iexplore : 6064
9 200 HTTP sp-coll-bbs.our-company-ag.com /_vti_bin/Webs.asmx 380 private, max-age = 0 text/xml; charset = utf-8 iexplore : 6064
10 302 HTTP sp-coll-bbs.our-company-ag.com /_vti_bin/usergroup.asmx 175 개인, 최대 연령 = 0 iexplore : 6064
11 200 HTTP sp- coll-bbs.our-company-ag.com/_layouts/AccessDenied.aspx 3,821 개인 텍스트/HTML; 문자셋 = UTF-8 IEXPLORE :

답변

0

6064 당신이 (당신의 비동기 매개 변수 전) WEBURL 매개 변수를 지정 시도하고 콘텐츠에 사이트의 정규화 된 도메인 이름 또는 상대 경로 중 하나를 지정?

$().SPServices({ 
    operation: "operationname", 
    webURL: "/sitepath", // <-- right here 
    async: false, 
    completefunc: function (xData, Status) { 
     ...do stuff... 
    } 
}); 

(구문 참조 : http://spservices.codeplex.com/wikipage?title=%24().SPServices)

또한 - 왜 $ (문서) .ready()의 두 복사본을해야합니까? 당신은 내면을 제거 할 수 있어야합니다.