[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Javascript question - popup or prompt box question

Posted on 2007-10-04
7
Medium Priority
?
741 Views
Last Modified: 2008-01-09
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

0
Comment
Question by:LuckyCold
  • 3
  • 2
  • 2
7 Comments
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20014032
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
 

Author Comment

by:LuckyCold
ID: 20014145
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
 
LVL 6

Expert Comment

by:rkannan2000
ID: 20014254
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20014304
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
 
LVL 23

Accepted Solution

by:
Ashish Patel earned 1200 total points
ID: 20014406
Okay buddy, i am off for the day now, so, let me know if this was useful.
0
 
LVL 6

Assisted Solution

by:rkannan2000
rkannan2000 earned 800 total points
ID: 20014868
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
 

Author Comment

by:LuckyCold
ID: 20015512
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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)
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses
Course of the Month20 days, 4 hours left to enroll

873 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