Loading

T

The Magnet

Hi,

I'm trying to find an example of a 'loading page' that I can use with
a transparent image. Basically the user clicks on the 'SAVE' button
and which the data is being saved I want to display this image and
prevent the user from doing anything.

There are multi-level DIVs on this page, so I do not know how hard
that makes it.

But I have the loading animated image and all, I just need to know how
to get it onto the page in the location where I want it and prevent
the user from doing anything else.

Do I use AJAX? Can anyone help?

Thanks!
 
W

wilq

Hi,

I'm trying to find an example of a 'loading page' that I can use with
a transparent image.  Basically the user clicks on the 'SAVE' button
and which the data is being saved I want to display this image and
prevent the user from doing anything.

There are multi-level DIVs on this page, so I do not know how hard
that makes it.

But I have the loading animated image and all, I just need to know how
to get it onto the page in the location where I want it and prevent
the user from doing anything else.

Do I use AJAX?  Can anyone help?

Thanks!

Make a div with css styles:

..SomeClass {
position: fixed,
z-index: 200000000 (big one),
width:100%,
height:100%,
background-color:black,
display:none
}


Then a element in HTML

<div id="someId" class="SomeClass"></div>


And put inside a loading image. Then from javascript side if you want
to show it just type:


document.getElementById('someId').style.display="block";
 
T

Thomas 'PointedEars' Lahn

wilq said:
Make a div with css styles:

.SomeClass {
position: fixed,
z-index: 200000000 (big one),
width:100%,
height:100%,
background-color:black,
display:none
}

This is one of the sillier approaches (if not the silliest I have seen to
date) because it is rather unlikely that there are this many child elements
in a reasonably sized HTML document, and it is rather likely that user
agents are not going to support that high a `z-index' value. IIRC, a
maximum was at 9999 in some more widely distributed UAs (CMIIW).

A black background alone is going to confuse the user at least; opacity
should be applied here, too.

The code is also syntactically invalid (the parenthesized instead of
/*...*/'d comment notwithstanding): You have confused CSS, where property
declarations must be separated with semicolon, with ECMAScript Object
initializers, where property name-value pairs must be separated with comma
(the above is the former).
Then a element in HTML

<div id="someId" class="SomeClass"></div>

And put inside a loading image. Then from javascript side if you want
to show it just type:

document.getElementById('someId').style.display="block";

An error-prone reference worm for sure, but what can you expect from blind
leading the blind.


PointedEars
 
W

wilq

An error-prone reference worm for sure, but what can you expect from blind
leading the blind.

PointedEars

Have I offend you? Because you do offend me.

1. If you have something to add, you can do it. Its obvious that I did
a "," instead of ";" - just a short simple example when switching from
JS programing can sometimes be confusing. I just assume that after he
get his first error with that, he will know whats the problem.

2. You said this solution is one of siliest - but what is your
proposition? Criticism giving no other approach is not criticism - its
simple annoying people around and trying to pretend be smart. Have
nice day smarthead.

3. Again you have alot to say but thats are only words - I wonder if
"The Magnet" apprecieate your help hahahaa
 
W

wilq

A black background alone is going to confuse the user at least; opacity
should be applied here, too.

Please provide nice, syntactically correct opacity version in css for
all browsers.
An error-prone reference worm for sure, but what can you expect from blind
leading the blind.

PointedEars

What else do you propose there? Changing a class name? Whatever... I
already spent too much time for you, and you are really not worth of
it.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top