Closed Thread Icon

Topic awaiting preservation: how do I display loading.. when page is loading? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21445" title="Pages that link to Topic awaiting preservation: how do I display loading.. when page is loading? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: how do I display loading.. when page is loading? <span class="small">(Page 1 of 1)</span>\

 
Pimms One
Bipolar (III) Inmate

From: Australia
Insane since: Jun 2003

posted posted 04-19-2004 08:17

I have used the following code, but I still get a blank page when the data is loading. How do I display a "loading..." when the data is loading and disappear after that?

code:
<% 

out.println("Loading...");

String recordSQL = "SELECT * from BS_PERSON ";
ResultSet rset = CM.executeQuery(recordSQL);
while (rset.next()) {
out.println(rset.getString("USERNAME");
}
%>

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 04-19-2004 14:47

This is a tough little bit of work to actually do. HTML is not designed to do this sort of thing.

I can't give you code for this because I haven't found a reason to do this.

The basic idea of a loading screen is designed around redirects and meta refreshes. You handle the loading of the data completely on the server separate from you pages, and while not done you have a page in the front which keeps checking if the data is loaded, if the data isn't loaded it redisplayes the loading, if the data is loaded it displays complete.

So if you set your meta redirect for say 2 seconds, when the page refreshes it has to check some global which states if the data is loaded or not, if the data is not loaded it displays its content, if the data is loaded you redirect to the display page.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-19-2004 15:00

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 04-19-2004 18:56

Is this the kind of thing you are looking for?


code:
<body  onload="Loaded();">

<div id="loading">
Please wait&#133;. Level #001 - &quot;LESSON 1&quot; is loading.
</div>



code:
<script language="JavaScript" type="text/javascript">
<!--
var loading_obj;


loading_obj = new utils.Layer(utils.Get_Layer("loading"));

function
Loaded()
{
loading_obj.Hide();
}
// end of script -->
</scrip`t>



You can see this script in action at http://www.hyperbole-software.com/ChipsChallenge/Pages/Map-001.html.

-- not necessarily stoned... just beautiful.

« BackwardsOnwards »

Show Forum Drop Down Menu