Jump to content

Loader gif


JonnoTheDev

Recommended Posts

Web project: hotel booking availability

On the above project I have a form that users select dates (arrival / departure) and enter a location to search. When complete the system will request available hotels from a remote server based on the user criteria. This is fine, however the remote server can take some time to return XML if there are a high number of hotels to return. What I implemented was a animated gif to be displayed while the data is being parsed. After the form is submitted and validated it simply displays the following:

// form validated
showLoader();

<div id="loading" style="display:none; position:absolute; width:100%; text-align:center; top:300px; z-index:300;"><img src="{$smarty.const.IMAGE_DIR}loader.gif" border="0"></div>
<script language="javascript">
var loader = document.getElementById("loading");
function showLoader() { 
loader.style.display = "block";
}
</script>

This displays fine on all browsers however on IE (v8 I am using) the gif does not animate. It sticks at the first frame until the results screen is displayed.

Am I missing something here?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.