SharePoint SpinWheel

Jul 25, 2011 at 12:37 PM

Hello,

  Is there a way to  add and animate /_layouts/images/gears_an.gif to my SPServices Page while the Service Request is being processed.  Everything I have seen seems to require calling SPLongOperation from the code beside.

Coordinator
Jul 25, 2011 at 1:52 PM

zedekiah:

Sure! Here's an example from one of my test pages:

var waitMessage = "<table width='100%' align='center'><tr><td align='center'><img src='/_layouts/images/gears_an.gif'/></td></tr></table>";
$(divId).html(waitMessage).SPServices({
  operation: "GetListCollection",
  completefunc: function (xData, Status) {
   var out = $().SPServices.SPDebugXMLHttpResult({
    node: xData.responseXML,
    outputId: divId
   });
   $(divId).html("").append("<b>This is the output from the GetListCollection operation:</b>" + out);
  }
}); 

M.

Jul 25, 2011 at 5:19 PM

beautiful.  Thanks

Dec 18, 2011 at 11:20 AM
Edited Dec 18, 2011 at 11:21 AM

Marc, i dont know what i am doing wrong here. It didnt work for me

<head>
    <title>Untitled Page</title>

    <script language="javascript" type="text/javascript" src="http://groupworldportal/gw/Documents/Jqueryui/1.4/jquery.min.js"></script>

    <script language="javascript" type="text/javascript" src="http://groupworldportal/gw/Documents/Jqueryui/SPServices/jquery.SPServices-0.5.8.min.js"></script>

    <script type="text/javascript">
           var waitMessage = "<table width='100%' align='center'><tr><td align='center'><img src='http://groupworldportal/gw/_layouts/images/gears_an.gif'/></td></tr></table>";
$("#ddd").html(waitMessage).SPServices({
  webURL: "http://groupworldportal/gw/news_events/",
  operation: "GetListCollection",
  completefunc: function (xData, Status) {
   var out = $().SPServices.SPDebugXMLHttpResult({
    node: xData.responseXML,
    outputId: "ddd"
   });
   $("#ddd").html("").append("<b>This is the output from the GetListCollection operation:</b>" + out);
  }
}); 
    </script>

</head>
<body>
<div id="ddd"></div>
</body>
Coordinator
Dec 29, 2011 at 2:30 PM

janeshh:

What happened?

M.