I have a webpage hosted on a server, say in http://SVR1/path/index.html , and I would like to access some list items on a local SharePoint site hosted on another server, for example, in http://SVR2/sites/mySite/ .
The current installation of SharePoint that I use (not under my control) does not allow to deploy either SharePoint hosting or applications hosted in the application, so I am trying to use the SharePoint cross-domain library to access the necessary list items from a purely external HTML5 / JS / page CSS3 As a user, I have full access rights to the list on my SharePoint site, so I think that there should be no problem reading its elements.
Following the example here , my page looks like this:
<!doctype html> <html> <head> <title>Application Template</title> <script language="javascript" type="text/javascript" src="js/jquery.js"></script> <script language="javascript" type="text/javascript"> var hostweburl = "http://SVR2/sites/mySite"; var appweburl = "http://SVR1/path"; </script> </head> <body> <h1 id="Root Page" style="text-align:center;">This is the home page</h1> <div id="renderList">Placeholder</div> </body> </html>
When I load the page in the browser, in the javascript console I get the error message: "Unused error: invalid field or requestInfo.url parameter.".
I get the impression that the problem is with the content of the appweburl variable, which in all the examples I found, is provided by SharePoint as part of the request part in the URL. But this means that the application hosted by the vendor has been deployed to SharePoint - something that I cannot do, and that this application calls the remotely hosted instance.
So the question is: is it possible to use the SharePoint cross-domain library on a page that is completely external to SharePoint, and if so, how do I install hostweburl , appweburl and, possibly, other things to access SharePoint lists?
Thanks in advance.
source share