SPServices and localhost

Jan 28, 2013 at 9:03 PM
Edited Jan 28, 2013 at 9:09 PM

Hello,

First off, thank you so much for all your work building SPServices.

I have been pulling my hair out for a while just getting GetListItems to work. I've been all over these discussion boards and the documentation and none of the example code would work.

I am doing all this running a locally installed copy of SharePoint that I have for my dev environment, so all pages were being viewed as http://localhost:16696/sitename.

I then completely accidentally opened the page I was working on with my computername as the url: http://ComputerName:16696/sitename and the GetListItems function began working perfectly. I can have the same page open with the different URLs in the same browser in two tabs, and in one the function fails, and in the other it succeeds.

Is this a known issue? Or am I just doing something weird?

The code I am running is

$().SPServices({
  operation: "GetListItems",
  async: false,
  listName: "TileCanvasRegions",
  completefunc: function (xData, Status) {
    alert( Status );
    alert( xData.responseText );
    //What do both of these say?  Feel free to <snip> the responseText
  }
});

This code came from @iOnline247 over at: https://dev.nothingbutsharepoint.com/sites/eusp/Forum/Pages/default.aspx?action=ViewPosts&fid=4&tid=809

When accessing site as LocalHost the boxes return "Error" and "Undefined". When accessing the site as computername the boxes show "Success" and my XML list data.

I just wanted to see if this is something I did weird? Or If this is an issue to be aware of for dev environments...