473,396 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

window load blocked for a while..

ROB
I'm loading a javascript using

<script LANGUAGE="JavaScript" type="text/javascript" src="highl.js"
></script>
The script also uses a window.onload to execute ...

This is blocking the web page load (waiting for the js to be completed)
-At the end of the page load I can see the content but window is not
responding (scroll, etc)

I was looking for something to load the script indipendently so that
the web page can load with no problems.

I would appreciate any suggestion. Thanks!!!

Rob

Oct 29 '06 #1
3 1702

ROB wrote:
I was looking for something to load the script indipendently so that
the web page can load with no problems.

I would appreciate any suggestion. Thanks!!!
You can have your onload function call the setTimeout function, which
will then stop blocking the page.

You can find more about setTimeout on google. Here is a starting point:

http://www.devguru.com/technologies/...ettimeout.html

Oct 29 '06 #2
ROB
Hi,

I tried with setTimeout and it is waiting for the time I set. Ok.

The problem here is that the browser is waiting when the script
starts..
Anything in the browser is blocked (buttons scrollbar etc)..

This is what I would like to avoid :(
Is there a way to execute the script in the "background" and use the
brower page in the meantime?

Thanks.
James Black ha scritto:
ROB wrote:
I was looking for something to load the script indipendently so that
the web page can load with no problems.

I would appreciate any suggestion. Thanks!!!

You can have your onload function call the setTimeout function, which
will then stop blocking the page.

You can find more about setTimeout on google. Here is a starting point:

http://www.devguru.com/technologies/...ettimeout.html
Oct 30 '06 #3

ROB wrote:
I tried with setTimeout and it is waiting for the time I set. Ok.

The problem here is that the browser is waiting when the script
starts..
Anything in the browser is blocked (buttons scrollbar etc)..
If your onload function calls a function that only calls setTimeout,
then there shouldn't be a pause.

If your buttons and all are waiting to load, then there is something
else blocking you.

On some browsers, such as IE, nothing will be drawn until the entire
screen layout is done. So, if you have a lot of input boxes, or select
boxes, that could slow it down from rendering initially.

Try to have a very simple page, then, if that loads quickly, start to
add in the more complex layout, and see what you add that causes it to
slow down too much.

Oct 30 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Pat | last post by:
I want to submit an HTML form and have the reply appear in a small window that overlays the form window. After the reply is read, the user should be able to delete the small window, and then...
14
by: Frances Del Rio | last post by:
I'm trying to open a url in a new window while pg loads (but NOT in a pop-up..) I need to do sthg like // while pg is loading.. window.location ='page.html' // but I need this to open in a...
18
by: Roger Withnell | last post by:
I open a new window from the current window to display maps. Several maps of different sizes can be displayed. The function is given the size of the map and adjusts the window size accordingly....
3
by: jayuya | last post by:
I have a simple page that I will like to display while i am processing the user request in the server. The page only has a label saying "Please Wait..." My objective is to show this window while...
6
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
3
by: Richard | last post by:
I have an ASP.NET webapp that generates a shipping label for a customer. When the user clicks on the label preview gif or on a "Print..." submit button, the app will open another window with a...
2
by: DOM_scripter | last post by:
Hi, I want to set a picture on the fly. For this I have a html file with only an <img> tag - kind of a placholder. So I do myWindow=window.open("data/myFile.html"). Then I set the src attribute of...
4
by: Alexey | last post by:
I have a situation where I need to respond to a link click by opening 2 windows and navigating to a URL in the parent window. Here's the function I invoke: function handleOfferLink(selfURL,...
11
by: frizzle | last post by:
Hi there, I need a function to prevent a page from being loaded too often too fast. So say, one is only allowed to refresh a single page 5 times in 10 seconds, or 10 times in 5 seconds (or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.