Make a layer in your HTML:

<div id="cover" style="display:none"></div>

Use your favorite CSS to position it in the viewport:

#cover{
    position:fixed;
     z-index:1000;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.5) url(spinner.gif) no-repeat center center;
}

And then show it while your Ajax whatever is running:

new Ajax.Request('foo.bar',{onCreate:function(){ $('cover').show(); },
     onSuccess:function(transport){
        //do whatever else
        $('cover').hide();
    }
});

If you are observing clicks on your page, this should stop them, because the layer lies above everything else when it's showing. If not, you could intercept these explicitly:

$('cover').observe('click',function(evt){evt.stop()});

Walter


On Jun 4, 2010, at 11:09 AM, Miguel Beltran R. wrote:



2010/6/4 Jelks <jelks.caban...@gmail.com>
Hoping not to reinvent the wheel, I am looking for a simple Prototype-
based progress indicator.  I'd like to display "One moment please ..."
with an animated GIF in something lightbox-like (but no Close button)
in the center of the screen.  It should also do the Lightbox-style
setting of the opacity of the page in the background, and the user
should not be able to click in that page at all while the box is
showing.

Anyone currently using such a beast or know of one?

Thanks,

Jelks


maybe you can find it here
http://scripteka.com/

--
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-scriptacul...@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