Link to home
Start Free TrialLog in
Avatar of LuckyCold
LuckyCold

asked on

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

Avatar of Ashish Patel
Ashish Patel
Flag of India image

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.
Avatar of LuckyCold
LuckyCold

ASKER

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.
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>
ASKER CERTIFIED SOLUTION
Avatar of Ashish Patel
Ashish Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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