Hi Everyone,
Thanks again for the help.
After adding "$.support.cors = true" to my script the list was able to pull data from different servers however this seems to only work with SharePoint2007 Sites.
If I try to do get data from an "Announcements" list that I created on our SP2013 Test site and insert and modify the code above inside a SP2007 Site, the code will not work but if I change the WebURL to another SP2007 Site it starts working again.
And if I placed the code within a CEWP on a SP2013 the code will also not work even if I'm pointing to a SP2007 Site it also doesn't work if I point the Web URL to the same 2013 Site by means of removing the weburl declaration or by declaring our SP 2013 as the web url target.
Location of CEWP: SP2007SiteA
WebURL Declared: SP2007SiteA
List: Announcements
Results: Success
Location of CEWP: SP2007SiteA
WebURL Declared: SP2007SiteB
List: Announcements
Results: Success
Location of CEWP: SP2007SiteB
WebURL Declared: SP2007SiteA
List: Announcements
Results: Success
Location of CEWP: SP2007SiteB
WebURL Declared: SP2007SiteB
List: Announcements
Results: Success
Location of CEWP: SP2007SiteA
WebURL Declared: SP2013SiteC
List: Announcements
Results: Fail
Location of CEWP: SP2007SiteB
WebURL Declared: SP2013SiteC
List: Announcements
Results: Fail
Location of CEWP: SP2013SiteC
WebURL Declared: SP2007SiteA
List: Announcements
Results: Fail
Location of CEWP: SP2013SiteC
WebURL Declared: SP2007SiteB
List: Announcements
Results: Fail
Location of CEWP: SP2013SiteC
WebURL Declared: SP2013SiteC
List: Announcements
Results: Fail
I've tried various combinations and minor modifications to the codes such as removing the "language = javascript" when placing the code on SP2013 but so far I haven't been able to make it work eventhough I was able to implement "Cascading dropdowns" on our SP2013 Sites.
I might try inserting the codes directly in the page with SharePoint Designer but in Theory inserting the codes via CEWP or embedding them to the page directly with SharePoint Designer should achieve the same results.
Is there something with my code?
Thanks again for all the Advice,
Francis
Thanks again for the help.
After adding "$.support.cors = true" to my script the list was able to pull data from different servers however this seems to only work with SharePoint2007 Sites.
If I try to do get data from an "Announcements" list that I created on our SP2013 Test site and insert and modify the code above inside a SP2007 Site, the code will not work but if I change the WebURL to another SP2007 Site it starts working again.
And if I placed the code within a CEWP on a SP2013 the code will also not work even if I'm pointing to a SP2007 Site it also doesn't work if I point the Web URL to the same 2013 Site by means of removing the weburl declaration or by declaring our SP 2013 as the web url target.
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.01/jquery.SPServices.min.js"></script>
<script language="javascript" type="text/javascript">
$.support.cors = true; //For Cross-Origin Resource Sharing (CORS)
$(document).ready(function() {
$().SPServices({
operation: "GetListItems",
async: false,
webURL: "Any_SP2007_site",
listName: "Announcements",
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
$("#tasksUL").append(liHtml);
});
}
});
});
</script>
<ul id="tasksUL"/>
Basically the pattern goes as follows:Location of CEWP: SP2007SiteA
WebURL Declared: SP2007SiteA
List: Announcements
Results: Success
Location of CEWP: SP2007SiteA
WebURL Declared: SP2007SiteB
List: Announcements
Results: Success
Location of CEWP: SP2007SiteB
WebURL Declared: SP2007SiteA
List: Announcements
Results: Success
Location of CEWP: SP2007SiteB
WebURL Declared: SP2007SiteB
List: Announcements
Results: Success
Location of CEWP: SP2007SiteA
WebURL Declared: SP2013SiteC
List: Announcements
Results: Fail
Location of CEWP: SP2007SiteB
WebURL Declared: SP2013SiteC
List: Announcements
Results: Fail
Location of CEWP: SP2013SiteC
WebURL Declared: SP2007SiteA
List: Announcements
Results: Fail
Location of CEWP: SP2013SiteC
WebURL Declared: SP2007SiteB
List: Announcements
Results: Fail
Location of CEWP: SP2013SiteC
WebURL Declared: SP2013SiteC
List: Announcements
Results: Fail
I've tried various combinations and minor modifications to the codes such as removing the "language = javascript" when placing the code on SP2013 but so far I haven't been able to make it work eventhough I was able to implement "Cascading dropdowns" on our SP2013 Sites.
I might try inserting the codes directly in the page with SharePoint Designer but in Theory inserting the codes via CEWP or embedding them to the page directly with SharePoint Designer should achieve the same results.
Is there something with my code?
Thanks again for all the Advice,
Francis