473,671 Members | 2,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page gets stuck... How to load javascript before page loads

1 New Member
Hi,

I have a very peculiar situation at hand. I am to load a page with images and drop down menu's and flyouts.. Needless to say i am using javascripts.. If i click on some links or flyouts before the page loads completely, the page gets stuck. I have to wait for the page to load completely, before i can do any operation. Kindly suggest me some means of getting around this. I desperatley need a solution..
I am calling a function on window.onload. I know this is where the issue is. As window.onload waits for the entire page to load. So is there any way of loading the scripts before the page loads completely? Any help in this regard would be greatly appreciated...
Aug 25 '07 #1
1 1738
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

One possibility for solving this if your page is taking too long to load is to just have HTML on the page. Then use unobtrusive Javascript techniques to load the Javascript after the page as loaded.

You could use getElementsByTa gName(tagname) and getElementById( id) to access elements and then set attributes, properties, etc.

This will mean that your page will not be fully functional when the page has loaded, but at least it won't get stuck.
Aug 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1846
by: CST | last post by:
Hi All, I have a "Digital Dashboard" that basically has 4 IFrame sections. The page flows in the following order: Messages, Stocks, Weather, User Links. Please note that this order needs to stay that way. Everything but the Stocks section is pulled from our dB. I am using the server control InetCtls.Inet to obtain the stock data from Yahoo Finance. The question I have is can I load the page using the dB driven sources
10
1718
by: darrel | last post by:
I have this structure: mypage.aspx (class = mypage) myusercontro.ascx On the mypage.aspx I can declare a variable: animal = "monkey" I can read this from the UC by simply doing this: mypage.animal
7
23337
by: UJ | last post by:
I've got a page with a user control on it. While the page is loading, it needs to check certain conditions of the user object to enable/disable things on the screen. Currently in the page_load of the user control I do things like read from the database on the first load, set some internal variables, ... If I need those things to be available to me on the page load, should I do them on page_init? Are there any ramifications of using...
7
4353
by: joey.powell | last post by:
I have a home page with username and password textboxes and a login button for purposes of users being able to log in (forms authentication) directly on the site home page. I also have a dedicated "Login.aspx" page, but I don't want users redirected there unless absolutely necessary. I have registered a javascript block via "Page.RegisterStartupScript" that sets focus to the "txtUserName" textbox control on Page Load. It works great...
15
10090
by: H00ner | last post by:
Hello All Hope you can help Been pulling my hair out about a popup problem in ASP.NET. One of the forms i wrote requires the user to select a product from a list in a popup web form. the popup has a DataGrid on it and the page.load function DataBinds as you'd expect. I have Code-Behind in C# to emit a call to a JavaScript function which
0
1048
by: Antonio | last post by:
Hi, we are trying to create a page for our users that contains a lot of data. One datagrid loads very slow because the query behind it is complex. We would like to load up the page to the user with the information that returns fast right away and let the data grid take it's time to load (about 10 seconds). But we don't want the user to have to click something after the page loads to start the query . we want the page_load event to...
1
3512
by: jeff_m | last post by:
Hello all, I'm having an issue with the following: I have an .aspx page with two html links that call distinct Javascript functions. I also have an iframe in the html of this .aspx page. The Javascript functions are supposed to redirect the iframe to a new page (different page for each link).
4
1790
by: Garry Jones | last post by:
I have recently constructed a website using a lot of php script (self taught). I now wonder if I should have construted the site in a different way. The page contains a header (a.php) and left column (b.php) that remain constant. Depending upon which heading is clicked in a menu row the user gets different information up in the main site area (three different versions of "c"). And a footer (d.php). What I think I have done is loading...
3
2726
by: The alMIGHTY N | last post by:
I have an XSL file that works with a typically large XML data set generated dynamically from a database. This data is written to the HTML result as a deep multi-dimensional array that is used by Javascript functions to build large expanding/collapsing tables to display the data. The original developer wrote the page so that many writeln functions were called in embedded Javascript to actually write the table as the page was loading....
0
8476
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8393
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7437
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6229
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.