Solved

Animated GIF stops animating when page is posted

Posted on 2004-09-13
12
528 Views
Last Modified: 2013-11-19
I have page1.asp that has an animated GIF inside a div -

<div id="pleaseWait"><img border="0" src="graphics/making_your_map.gif"></div>

Near the bottom of my page I have -

<script language="javascript">
   document.getElementById("pleaseWait").style.visibility = "hidden";
<script>

I have a javascrpt function  -

PostMap(){

 document.getElementById("pleaseWait").style.visibility= "visible";
 document.demo.action="processGPS.asp";
 document.demo.method="post";
 document.demo.submit();
}

However, as soon as the page is posted to "processGPS.asp", the animiated GIF stops animating..I want it to keep animating to let the user know to wait while the server is processing.

How do I get it to keep animating?
0
Comment
Question by:Malek103197
[X]
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
12 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 12051207
You'll have to put the animating code once more in processGPS.asp. Can you post your code?
0
 

Author Comment

by:Malek103197
ID: 12051234
Here's my processGPS.asp =

<%@Language=VBScript%>
<%
'Option explicit
Response.Buffer = TRUE
Response.Expires = 0
Response.ExpiresAbsolute = Now - 1
%>

<html>
<head>
<title>Process the Form</title>
</head>
<body bgcolor = "white">


<%
      tripDate = Request.Form("selDate")
      tripTruck = Request.Form("truckName")
            
      dllText = tripDate & "+" & tripTruck
      
      Set objMap = Server.CreateObject ("traceLayer.createTraceLayer")
        bReturn = objMap.CreateGPSLayer(dllText)
        set objMap =nothing
      Response.Redirect("TripReport1.asp?retDLL=" & dllText)

'======================================================

%>

</body>
</html>
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12051255
I would suggest using a frameset. Have the top frameset have the loading animation. Then, in the bottom frameset, have some Javascript that will "turn off" the top frameset by hiding it. This is because since ASP is server-side, you should have the frameset display the image while it's processing.
0
Technology Partners: 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!

 

Author Comment

by:Malek103197
ID: 12051270
Ok, I'll change my page so I have a frame
0
 

Author Comment

by:Malek103197
ID: 12051283
can I embed a frameset within a cell of a table?
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12051287
Not with an iframe. You need a separate frame, because the iframe will be loaded with the HTML on the page, so the animation will display AFTER the ASP is done processing. If you use a frame, the frameset page will load and both will be loaded at the same time, so while the ASP is processing, you top frame, for instance, can have the image showing.
0
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 250 total points
ID: 12052711
I think the problem is on how you call the function of PostMap(), didn't you called it from a hyperlink (<a>) ? if yes, make sure you put a "return false" there in the onclick event..
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 12071218
you can check if page was completely loaded by...

var tmr;
function onLoad_(){
    clearTimeout(tmr)
    if(document.body.readyState.toLowerCase() == "complete"){
         document.getElementById("pleaseWait").style.visibility = "hidden";
         return
     }
     tmr=setTimeout('onLoad_()',50)
}
   
<body onload="onLoad_()">
0
 

Author Comment

by:Malek103197
ID: 12112272
Sorry folks, I got distracted for a bit on this one..Let me try some of this stuff and get back toy ou soon.
Thanks
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where does legacy ASP.NET initialize language? 2 63
output of netstat -r in Powersshell HTML 3 47
Validating Date 4 29
Link not working 6 43
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

726 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