• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doing auto-submit while displaying animated gif

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying POST parameters by doing a submit automatically when my page is accessed, and thus redirecting the user to another application. I am able to redirect successfully.
However, in my effort to display an animated gif (e.g., hourglass), I am either able to show the animation or do the redirect, but not both.(I only get a stationary image - not animated - when I am able to successfully redirect). Please look at the <BODY>
Here is my code. Any help would be greatly appreaciated:

<html lang="en">
<HEAD>
<TITLE>Application Forward</TITLE>
</HEAD>
<script LANGUAGE="JavaScript">
function start(){
document.hssBridgeForm.submit();
}
</script>
<style>
#wait
{
font-family: Arial, Verdana, Helvetica, MS Sans Serif;
position:absolute;
left:1px;
top:100px;
width:450px;
height:450px;
visibility:hidden;
clip:rect(0px 450px 450px 0px);
}
</style>
<script langage=javacript>
//Preload the wait image
PreloadImage()
if (document.layers)
{
document.captureEvents(Event.LOAD)
}
function PreloadImage()
{
alert("preloading");
if (!document.images) return;
var imgs = new Array();
var PIargs = PreloadImage.arguments
for (var i = 0; i < PIargs.length; i++)
{
imgs[i] = new Image;
imgs[i].src = PIargs[i];
}
}
</script>
<BODY> // using this tag I am able to display animated gifs
<!--BODY onLoadd="start()" -->// using this tag, the animation stops, but redirect is successful
<form name="hssBridgeForm" action="http://www.yahoo.com" method="post">
<p>
<input type="hidden" name="USER_ID" value="4455asdf">
</p>
<img src="sequence2.gif" name="waitimage" id="waitimage">
<form>
</BODY>
</html>
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is the way the browser renders the page. It is common for annimations to not run when a process is happening. There is no real solution to the problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic