Show "Loading..." DIV a la gmail.com in the right top corner

Y

yonthebeach

Hi,

how can i show a div on the top right corner like gmail's "Loading..."
div?

thanks
yavuz
 
J

Jonathan N. Little

Hi,

how can i show a div on the top right corner like gmail's "Loading..."
div?
Not sure exactly what you want, but solution JavaScript dependent.

JavaScript:

function loadMsg(){
var el=document.getElementById('loading');
el.style.display="none";
}

// attach event after page loads
if( window.addEventListener ) {
window.addEventListener('load',loadMsg,false); //legacy
} else if( document.addEventListener ) {
document.addEventListener('load',loadMsg,false); //proper
} else if( window.attachEvent ) {
window.attachEvent("onload", loadMsg); //IE only
}


HTML:

<div id="loading">Loading...</div>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top