SPServices wait for data to load

Oct 15, 2012 at 6:30 AM

Hi All,
   Hope all is well?
Just a question regarding using SPServices.
I'm using SPservices to load some data onto my DataView WebPart using  text file.
So my script is in .txt and and i use Content Editor Webpart to load.
I would like to have the data load completely before i append the data to the DIV element i'm using.

I also want  this behaviour for other things i'm using SPServices for e.g my navigation menu.

Why i want this is when the page loads i would like to show some loading or waiting image...

Everything works now but i noticed the page flickers sometimes when i view it in IE 8, 9 etc..for some reason its smooth in Firefox:)

Any ideas will be appreciated.
Cheers

Coordinator
Oct 15, 2012 at 1:19 PM
Edited Oct 18, 2012 at 1:54 PM

Yeah, IE is troublesome that way. It's one of the reasons that building and testing with other browsers isn't a great idea.

If you do some Bingling, you'll see examples from others about how to overcome this. One really good trick, though, is to keep the parts of the page you are loading hidden until they are fully loaded.

M.

Oct 18, 2012 at 6:51 AM

Hi Marc,
       Sorry for the trouble.

But can you just paste some simple snippet code.
Basically not to load the data to the element unless data is retrieved and maybe showing a waiting message.

Cheers

Coordinator
Oct 18, 2012 at 1:56 PM

Take a look at this pge on my demo site.
http://www.sympraxisconsulting.com/Demos/Demo%20Pages/SPjQueryWebServices.aspx

It shows the standard SharePoint spinner while waiting for a Web Service operation to complete.

M.