Javascript question - popup or prompt box question

Hi Javascript experts,

I have a html page which has a hyperlink to open the pps (powerpoint file). It takes quite some times to load the pps, I want to pop up a messagebox to tell users someting like" file  is loading, please be patient"
Please advise how to do it?

Thanks

LuckyColdAsked:
Who is Participating?
 
Ashish PatelCommented:
Okay buddy, i am off for the day now, so, let me know if this was useful.
0
 
Ashish PatelCommented:
You will have to create a page which will open in the new window and in that page you can have your custom message alogn with a javascript which fires on onLoad of body downloading the ppt file.
0
 
LuckyColdAuthor Commented:
Hi asvforce,
Can you give me an example or code. I am not sure how to do it.......................

Here is my ahref on my first htmp page
<div align="center"><a href="/servername/xxx.pps"><img src="/serername/sss.gif"></a ></div>

Thanks in advance.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
rkannan2000Commented:
0
 
Ashish PatelCommented:
Create a new page lets say "custommess.htm" like this
custommess.htm
<html>
<head>
<script>
      function shootMe() {
            document.getElementById('shoot').click();
      }
</script>
</head>
<body onLoad="shootMe()">
      <b>Please wait</b>
      <a id="shoot" href="/servername/xxx.pps"><img src="/serername/sss.gif"></a>
</body>
</html>


and your tag in your first.htm page should be like this
<div align="center"><a href="custommess.htm" target="_blank"><img src="/serername/sss.gif"></a ></div>
0
 
rkannan2000Commented:
Step 1:
Create a HTM File....
<!------------Progress.htm--------->
<HTML>
<script type="text/javascript" src="xp_progress.js">
</script>
<script type="text/javascript">
function redirectpage(){
bar3.togglePause();
opener.location="http://www.rkannan.com";
self.close();
}
</script>
<body>
Loading...
<script type="text/javascript">
/*window.document.statusbar.enable = false*/
var bar3= createBar(320,15,'white',1,'black','blue',85,7,3,"redirectpage()");
</script>
</body>
</HTML>
<!---------- Progress.htm--------->


Step 2:
Create a HTM file.....
<!------------MAIN.HTM----------->
<HTML>
<script type="text/javascript">
function a()
{
javascript:window.open('progress.htm','','width=350,height=100,scrollbars=no,resizable=no,left=500,top=500,toolbar=no,location=no');
}
</script>
<BODY>
<input type=button onclick="javascipt:a();" value="load"><BR>
<a href='#' onclick="javascipt:a();"> Click here</a>
</BODY>
</HTML>
<!----------MAIN Ends----------->

Step 3:
Hi just download this js from the following url..
http://www.dynamicdrive.com/dynamicindex11/xp_progress.js
and Save in the same directory where the HTM files are saved.

Now open the Main.htm file and click the button/Link.....


Regards
Kannan R
0
 
LuckyColdAuthor Commented:
Thanks asvforce and rkannan2000
My requirement is changed,  I am going to close this question and open a new questions. Please help if you can

Thanks a lot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.