HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Change Image After 5 Seconds
Post new topic   Reply to topic    HTML Help Forum -> Images & Graphics
View previous topic :: View next topic  
Author Message
azylka



Joined: 09 Dec 2008
Posts: 3

PostPosted: Tue Dec 09, 2008 2:46 pm     Change Image After 5 Seconds Reply with quote

I have a website which uses redirects and I have had bad experiences with them. I know that sometimes they don't work and I want to make my site work with that problem. I want to be able to change an image after my redirect period of 3 seconds is over from a loading image

()


to my logo (not shown) so that if the redirect doesn't work, then my users don't have to look at a loading image.


------------------------
Thanks in advance,
Alex
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

PostPosted: Wed Dec 10, 2008 6:09 am     Reply with quote

The best of course would be to use Flash (or Swish) or even a animated gif (having it only rotate once).

_________________
Corey
Toll Free Solutions | Mile High Merchant Accounts | Expression Web Blog
azylka



Joined: 09 Dec 2008
Posts: 3

PostPosted: Wed Dec 10, 2008 2:18 pm     How To Do This Reply with quote

I'm not experienced with Flash or images and was hoping that some javascript could get me through. would you be willing to give me instructions on how to do this?

Thanks,
Alex
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

PostPosted: Wed Dec 10, 2008 4:19 pm     Reply with quote

JavaScript can be even more unreliable.

Try this re-direct script though:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
<!-- Hide script from non-JS supported Browsers
function redirect(){
window.location.replace ("http://www.example.com");
}
setTimeout("redirect()",5000);
// end hiding
</script>

<meta http-equiv="refresh" content="5; url=http://www.example.com">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Untitled 1</title>
</head>

<body>

</body>

</html>

It might be better than the re-direct code that you were using previously.

_________________
Corey
Hosting Solutions | Mile High Merchant Accounts | Expression Web Blog
jigolo



Joined: 05 Jan 2009
Posts: 4

PostPosted: Mon Jan 05, 2009 7:42 am     Reply with quote

I've got the same problem. Thank you for the re-direct code scripts you have shared sir. I try to apply it into my gallery sites. Many thanks!
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> Images & Graphics All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial