?
Solved

Animated GIF stops animating when page is posted

Posted on 2004-09-13
12
Medium Priority
?
535 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 53

Accepted Solution

by:
Ryan Chong earned 1000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
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…
Suggested Courses

770 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