...

View Full Version : please wait while the page loads



cyrus
10-09-2003, 07:45 PM
I have a huge java script that even takes up to 15 seconds to load on a high speed connection is there a way I can sneak a please wait for the page to load or may take several second for page load in there while the page is loading?

Vladdy
10-09-2003, 07:50 PM
... I'm very curious to see that javascript...

Basscyst
10-09-2003, 08:01 PM
Without seeing the code, you might try this. Just call it at the begining of your script. I use a little animated stopwatch gif to show that it is proccessing.

function statusWin()
{
msg=window.open("","msg","height=15 width=175,left=420,top=300");
msg.document.write("<html><title>Processing. . .</title>");
msg.document.write("<body bgcolor='white'>");
msg.document.write("<center><b><font color=red><div id='a'>Retrieving Data Please Wait. . .</div><img src='stopwatch1.gif'></font></center>");
msg.document.write("</body></html><p>");
}

then at the end of you script put this.

msg.close();

cyrus
10-10-2003, 04:48 AM
I only have my script refrenced so now how would I have this setup?


<table border="0" cellspacing="0" cellpadding="0" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9">
<tr align="center">
<td nowrap height="11">
&nbsp;&nbsp;&nbsp;
<script src="java/filterddm.js"></script>
</td>
</tr>
</table>

Basscyst
10-10-2003, 05:27 AM
Put the function inside the js file you can just paste it into the very top of the document outside of any existing functions. Then at the start of your existing script call the function:

statusWin();

after the last portion of your script runs put:

msg.close() \\ to close the window

If you upload the file I can put it in there 4 u if you are still not clear.

cyrus
10-10-2003, 07:28 PM
I have tried this several way so Im gonna upload my text file thanks for your help Basscyst i cant attach because the file is to big so I uploaded it to my site heres the link:

HERE (http://eyeonmyweb.com/filterddm2.txt)

cyrus
10-10-2003, 08:05 PM
or HERE (http://www.royaloakslife.com/filterddm2.txt) since the one above seems to be down at the moment

Basscyst
10-10-2003, 08:06 PM
OK - I will look at it later on I can't access it from where I'm at now. (Fire Wall)

Basscyst
10-10-2003, 08:07 PM
Oh Ok writing that just as you posted the second link it works.

Basscyst
10-10-2003, 08:13 PM
Wow man thats HUGE. I would suggest parsing up the array into different js files and only searching and loading the applicable array. I'd be intrested to see this script in action, do you have it on a site I \ we all could look at? It really looks like you are in need of a database and some server side scripting in lieu of the javascript.

Vladdy
10-10-2003, 09:32 PM
If you optimize your data organization, you can easily reduce the size of this file by an order of magnitude and more:

cyrus
10-10-2003, 09:38 PM
I also found something I think will works plus here is the script at work.... HERE (http://www.trueflow.com/filtertestddm.htm) click the product search button

cyrus
10-11-2003, 02:00 AM
Originally posted by Vladdy
If you optimize your data organization, you can easily reduce the size of this file by an order of magnitude and more:

how would I do this?

cyrus
10-11-2003, 02:01 AM
Originally posted by Basscyst
Wow man thats HUGE. I would suggest parsing up the array into different js files and only searching and loading the applicable array. I'd be intrested to see this script in action, do you have it on a site I \ we all could look at? It really looks like you are in need of a database and some server side scripting in lieu of the javascript.

Or how would I parse up the array? any suggestion to make this smaller and "quicker qould be greatly appreciated

Vladdy
10-11-2003, 02:10 AM
Originally posted by cyrus
how would I do this?

use objects to store your data. Then you can get rid all all
ComboBox[a][b][c] = new Option (

cyrus
10-11-2003, 10:36 PM
if either of you would show me how to make my code smaller and faster I would apperciate it very much..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum