javascriptjqueryweb-servicessharepointspservices

Add URL Parameter to SPServices


I am using a simple SPServices request that works perfectly on desktop :

$().SPServices({
      operation: "GetListItems",
      webURL : "mysite.com",
      listName: "ListName",
      CAMLQuery: "",
      error: function (xhr, message, error) {
            alert('Error : ' + error);
      },
      completefunc: function (xData, status) {
        console.log('Status: '+status+' xdata: ' + 'RESPONSE: ' + xData.responseText);
      }
  });

On my mobile I need to add an URL Parameter to the URL to disable an add-on installed on my SharePoint 2010. Adding the parameter in the webURL argument is not working because the ID list is added after.

Disabling this addon is not an option.

Do you have an idea how I could do that ? I checked the documentation and a lot of forum without finding any solutions...

I have jquery.SPServices-2014.01.min.js / jquery-1.11.0.min.js / jquery.mobile-1.3.2.min.bis.js


Solution

  • I will answer myself as I found a solution.

    After a lot of research, I don't think it is possible for the moment to add URL parameters using SPServices request.

    I wanted to add a URL Parameters specifying that I was not a mobile, instead I created a wrapper app with a webview and I changed the user agent. Works now perfectly for me.