locked
Why is IE7 and IE8 Giving me “Access Denied” when calling jQuery RRS feed

  • Question

  • User-1182082403 posted

    <script type="text/javascript" src="scripts/jquery-1.4.2.js"></script>
                    
    <script type="text/javascript">

     $(document).ready(function () { 
           
           var currentyear = (new Date).getFullYear(); 
           var previousyear = currentyear -1; 
           var server =  '<%=ConfigurationManager.AppSettings["RootPath"].ToString() %>'
           
           var currentyearURL = server+"/asp/ireli/News/"+currentyear+"/_vti_bin/lists.asmx"; 
           var previousyearURL = server+"/asp/ireli/News/"+previousyear+"/_vti_bin/lists.asmx"; 
           
                           var soapEnv = "<soapenv:Envelope 

    xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>"; 
                               soapEnv += "<listName>Pages</listName>"; 
                               soapEnv += "<query><Query><Where><And><Or><Contains><FieldRef Name='PLorAG' /><Value 

    Type='Choice'>P</Value></Contains><Contains><FieldRef Name='PLorAG' /><Value Type='Choice'>B</Value></Contains></Or><Or><Eq><FieldRef Name='ShowiniReli' 

    /><Value Type='Boolean'>1</Value></Eq><Contains><FieldRef Name='PublishingImageCaption' /><Value 

    Type='HTML'>yes</Value></Contains></Or></And></Where></Query></query>"; 
                          soapEnv += "<viewFields><ViewFields><FieldRef Name='EncodedAbsUrl'/><FieldRef 

    Name='Title'/></ViewFields></viewFields><rowLimit>60</rowLimit>"; 
                          soapEnv += "</GetListItems></soapenv:Body></soapenv:Envelope>"; 
                         
     
                           
     
               $.ajax({ 
                   url: currentyearURL, 
                   type: "POST", 
                   dataType: "xml", 
                   data: soapEnv, 
                   complete: processResult1, 
                   contentType: "text/xml; charset=\"utf-8\"" 
               }); 
               
               $.ajax({ 
                   url: previousyearURL, 
                   type: "POST", 
                   dataType: "xml", 
                   data: soapEnv, 
                   complete: processResult1, 
                   contentType: "text/xml; charset=\"utf-8\"" 
               }); 
           }); 
           
           
           
           

     
     
     
     
           function processResult1(xData, status) { 
                   $('#WSResponse').text(status); 
       $(xData.responseXML).find("z\\:row").each(function() { 
             var liHtml = "<A href='" + $(this).attr("ows_EncodedAbsUrl") + "' target=_blank>";  
               liHtml += "<li>" + $(this).attr("ows_Title")+ "</a>"; 
               
          

           $("#news").append(liHtml); 
       }); 
       //} 
     
         
           } 


    </script>

    Tuesday, October 8, 2013 12:29 AM

All replies