Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-09-2003, 07:45 PM   PM User | #1
cyrus
New Coder

 
Join Date: Jun 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
cyrus is an unknown quantity at this point
please wait while the page loads

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?
cyrus is offline   Reply With Quote
Old 10-09-2003, 07:50 PM   PM User | #2
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
... I'm very curious to see that javascript...
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 10-09-2003, 08:01 PM   PM User | #3
Basscyst
Smokes a Lot


 
Join Date: Jul 2003
Location: CA, USA
Posts: 1,594
Thanks: 5
Thanked 20 Times in 20 Posts
Basscyst is on a distinguished road
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();
Basscyst is offline   Reply With Quote
Old 10-10-2003, 04:48 AM   PM User | #4
cyrus
New Coder

 
Join Date: Jun 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
cyrus is an unknown quantity at this point
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>
cyrus is offline   Reply With Quote
Old 10-10-2003, 05:27 AM   PM User | #5
Basscyst
Smokes a Lot


 
Join Date: Jul 2003
Location: CA, USA
Posts: 1,594
Thanks: 5
Thanked 20 Times in 20 Posts
Basscyst is on a distinguished road
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.
Basscyst is offline   Reply With Quote
Old 10-10-2003, 07:28 PM   PM User | #6
cyrus
New Coder

 
Join Date: Jun 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
cyrus is an unknown quantity at this point
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
cyrus is offline   Reply With Quote
Old 10-10-2003, 08:05 PM   PM User | #7
cyrus
New Coder

 
Join Date: Jun 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
cyrus is an unknown quantity at this point
or HERE since the one above seems to be down at the moment
cyrus is offline   Reply With Quote
Old 10-10-2003, 08:06 PM   PM User | #8
Basscyst
Smokes a Lot


 
Join Date: Jul 2003
Location: CA, USA
Posts: 1,594
Thanks: 5
Thanked 20 Times in 20 Posts
Basscyst is on a distinguished road
OK - I will look at it later on I can't access it from where I'm at now. (Fire Wall)
Basscyst is offline   Reply With Quote
Old 10-10-2003, 08:07 PM   PM User | #9
Basscyst
Smokes a Lot


 
Join Date: Jul 2003
Location: CA, USA
Posts: 1,594
Thanks: 5
Thanked 20 Times in 20 Posts
Basscyst is on a distinguished road
Oh Ok writing that just as you posted the second link it works.
Basscyst is offline   Reply With Quote
Old 10-10-2003, 08:13 PM   PM User | #10
Basscyst
Smokes a Lot


 
Join Date: Jul 2003
Location: CA, USA
Posts: 1,594
Thanks: 5
Thanked 20 Times in 20 Posts
Basscyst is on a distinguished road
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.
Basscyst is offline   Reply With Quote
Old 10-10-2003, 09:32 PM   PM User | #11
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
If you optimize your data organization, you can easily reduce the size of this file by an order of magnitude and more:
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 10-10-2003, 09:38 PM   PM User | #12
cyrus
New Coder

 
Join Date: Jun 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
cyrus is an unknown quantity at this point
I also found something I think will works plus here is the script at work.... HERE click the product search button
cyrus is offline   Reply With Quote
Old 10-11-2003, 02:00 AM   PM User | #13
cyrus
New Coder

 
Join Date: Jun 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
cyrus is an unknown quantity at this point
Quote:
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 is offline   Reply With Quote
Old 10-11-2003, 02:01 AM   PM User | #14
cyrus
New Coder

 
Join Date: Jun 2003
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
cyrus is an unknown quantity at this point
Quote:
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
cyrus is offline   Reply With Quote
Old 10-11-2003, 02:10 AM   PM User | #15
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
Quote:
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 (
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:45 PM.


Advertisement
Log in to turn off these ads.