One way to do this is to add an overlay to your page.

<div id="overlay"></div>

#overlay {
        position: static;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: url(spinner.gif) rgba(0,0,0,0.7);
        z-index: 1000;
}

document.observe('dom:loaded',function(){ $('overlay).hide();});

Then slave the show/hide to your Ajax methods, or use the technique outlined in 
the AjaxResponders docs to have one listener for all Ajax events: 
http://api.prototypejs.org/ajax/Ajax/Responders/

Walter

On May 8, 2012, at 10:54 AM, Phil Petree wrote:

> Lets say I have this div imbedded in my page:
> <div id='systemWorking'><img src='spinner.gif'>Saving...</div>
>  
> And I have a list with 1000 entries and the user has scrolled down mid way... 
> if I unhide the spinner using this:
>     document.getElementById('inProgress').style.display = 'inline';
> 
> It shows but it shows in the location where it's imbedded in the page (top, 
> bottom etc.) but not necessarily viewable to the user.  I want to reposition 
> the div so that its always centered in the screen.
>  
> How does one go about this?
>  
> Thanks,
>  
> Pete
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to