Please wait.... message before the page load

Posted on 2003-11-05
Last Modified: 2012-05-04
Does anyone know how to show a "please wait..." message until the page load was finished?

I have an image button on a page called 'Take Test'. But loading of test page takes some time. So I want to show "Please wait loading" text above the image button.

Thanks in advance.
Question by:anandnerkar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 9691640
here is something I found from Google, it seems to do what you want.


Expert Comment

ID: 9691693

Author Comment

ID: 9691765
Hey thanks for quick reply... but I dont want image preload code.

I have a page which has "Take test" image button. On click it starts to load a test i,e question pages. This page is very large so it takes time to download. So after button click I want to show 'Please wait....' text above the image button itself untill the question page load was finished.
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

LVL 23

Expert Comment

by:Saqib Khan
ID: 9691927

<title>Load Test</title>
function kk() {
document.getElementById("s").style.visibility = "visible"

<body topmargin="0" leftmargin="0" onLoad="kk()">
<div id="s" style="visibility:hidden">
<p><img border="0" name="ss" src="img1.jpg" width="800" height="600"></p>


LVL 23

Expert Comment

by:Saqib Khan
ID: 9691933
so b/w the DIV tag is your Page Content.
And Customize your Loading.. message to anything you want.
LVL 10

Accepted Solution

NetGroove earned 200 total points
ID: 9697033
Here is my proposal:

function showContent() {
  document.getElementById("wait").style.display = "none"
  document.getElementById("content").style.display = "block"
  window.document.title = "Content loaded.";
<body  onLoad="setTimeout('showContent()',5000)">
<div id=wait><center>
<img src="">
<div id="content" style="display:none;">
<H1>Some content</h1>

It hides the wait div after loading.

Change for your production this demo from this:
<body  onLoad="setTimeout('showContent()',5000)">

To this:
<body  onLoad="showContent()">

The five seconds are only for the demo wait time.

Good luck,


Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question