👤
Home Man
Search
Today's Posts
Register

Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, HTML, SEO, and other Web APIs and topics.

Changing Images in HTML

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 05-28-2015
Changing Images in HTML

Hi,
I recently bought shared hosting at asphostportal.com. Now, I have little problem. Could you help me please? How to change the images after every 5 seconds in html?
The images should display in the same places for every 5 seconds?
can anybody send me code please.

Thanks.
# 2  
Old 05-28-2015
Jquery slide show (fades out/in images)....see...

Download Jssor Slider Free for website design

sample: Simple Fade Slideshow

supposedly free to download, no usage restrictions.
# 3  
Old 05-31-2015
Google for slideshow javascript and many examples of sample code will come to the fore.
# 4  
Old 05-31-2015
Quote:
Originally Posted by blackrageous
Jquery slide show (fades out/in images)....see...

Download Jssor Slider Free for website design

sample: Simple Fade Slideshow

supposedly free to download, no usage restrictions.
Thank you very much

---------- Post updated at 09:10 PM ---------- Previous update was at 09:06 PM ----------

Quote:
Originally Posted by figaro
Google for slideshow javascript and many examples of sample code will come to the fore.
I tried to use google for slideshow js, but I get problem. My image slideshow works in all browser but not in Google Chrome. Any idea how to fix it ? Thank you very much
# 5  
Old 06-01-2015
You can try this code may be it will work for you.

Code:
<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns = "http://www.w3.org/1999/xhtml">
   <head>
      <title>change picture</title>
      <script type = "text/javascript">





        function changeImage()
{
    var img = document.getElementById("img");
    img.src = images[x];
    x++;

    if(x >= images.length){
        x = 0;
    } 
   var timerid = setInterval(changeImage(), 1000);
}


}

var images = [], x = 0;

images[0] = "image1.jpg";
images[1] = "image2.jpg";
images[2] = "image3.jpg";


      </script>
   </head>
   <body onload = "changeImage()">
 <img id="img" src="startpicture.jpg">
   </body>
</html>


Last edited by jim mcnamara; 06-01-2015 at 09:12 AM..
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bash Script to find/sort/move images/duplicate images from USB drive JonaQuinn Shell Programming and Scripting 1 10-16-2014 02:34 PM
Difficulty cleaning references to duplicated images in HTML code mdart Shell Programming and Scripting 9 01-31-2013 05:59 AM
Mutt for html body and multiple html & pdf attachments raggmopp UNIX for Advanced & Expert Users 1 12-05-2012 10:18 PM
Removing all except couple of html tags from html file juubuntu Shell Programming and Scripting 0 06-21-2012 08:07 AM
accepting images as a list and changing the name subway69 Shell Programming and Scripting 3 04-25-2012 06:51 PM
Send HTML body and HTML attachment using MUTT command vickramshetty Red Hat 2 05-11-2010 10:33 AM
Referring to attached images in html email body through mailx biswasbaishali Shell Programming and Scripting 5 03-15-2010 01:13 PM
shellinabox/html help to insert a keypress with an html button syadnom UNIX for Advanced & Expert Users 0 12-11-2009 10:31 AM
html link to images in /tmp directory Solerous Web Programming 2 11-25-2008 01:00 PM
How do I extract text only from html file without HTML tag los111 UNIX for Dummies Questions & Answers 4 11-28-2007 03:40 AM


All times are GMT -4. The time now is 04:33 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?