Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 10-25-2009, 07:31 AM
website-seo website-seo is offline
Banned
 
Join Date: 10-22-09
Posts: 387
iTrader: 5 / 86%
Javascript Change Image?

Can anyone make me a script that using javascript, changes an image to another image after a set amount of time, and that changes to another picture after another set amount of time, and so on...

I give out rep to those that answer my questions! (with the correct script)
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 10-25-2009, 07:32 AM
website-seo website-seo is offline
Banned
 
Join Date: 10-22-09
Posts: 387
iTrader: 5 / 86%
This is a pretty simple script, it shouldn't take more than 5 minutes to make it.

Please help me. I am only learning javascript.

I just relised that this is just a slideshow script. I was having such a hard time describing it before.

I need a script that stays on one picture for 1 sec., another picture 2 sec... you get the idea.

Last edited by HTMLBasicTutor; 10-25-2009 at 01:22 PM.
 
Reply With Quote
  #3  
Old 10-25-2009, 01:25 PM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,710
iTrader: 5 / 100%
A javascript slideshow only works if the visitor has javascript turned on (some surf with scripting turned off for security reasons).

Although not the coolest, latest greatest method, have you thought of using an animated gif? You didn't say what kind of images you are trying to slideshow. It is cross browser compatible and doesn't require scripting.
 
Reply With Quote
  #4  
Old 10-29-2009, 03:51 PM
megamoose's Avatar
megamoose megamoose is offline
v7n Mentor
 
Join Date: 06-04-06
Location: Guildford
Posts: 557
iTrader: 2 / 100%
You can do this using timers.

Just create something like:
Code:
<script type="text/javascript"> setTimeout ( "ChangeImage()", 2000 ); function ChangeImage ( ) { if(document.getElementById("imgid").src="image.jpg") { document.getElementById("imgid").src="newimage.jpg"; setTimeout ( "ChangeImage()", 10000 ); } else { document.getElementById("imgid").src="newimage2.jpg"; } } </script> <img id="imgid" src="image.jpg" />
This will change the image after 10 seconds
 
Reply With Quote
  #5  
Old 10-31-2009, 06:11 AM
website-seo website-seo is offline
Banned
 
Join Date: 10-22-09
Posts: 387
iTrader: 5 / 86%
Thanks for trying, but I found a good script elseware.
 
Reply With Quote
  #6  
Old 11-02-2009, 11:34 PM
jamesparker jamesparker is offline
Banned
 
Join Date: 11-02-09
Posts: 362
iTrader: 0 / 0%
Hi

It may be possible in slide shows there are many tools for slide show.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple JavaScript help please - image embedding Jason Coding Forum 5 06-16-2009 01:55 PM
Change image sinster Coding Forum 6 09-22-2007 07:38 AM
How to Change the Text Field of a Remote File with JavaScript? ivenms Coding Forum 4 09-02-2007 12:27 PM
[JavaScript] Checking if the image is loaded mess_alex Coding Forum 1 09-26-2006 04:57 PM
Javascript: Dynmically change match criteria in RegExp?? Once Coding Forum 0 06-03-2004 01:16 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 02:10 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC