Changing Images in HTML


 
Thread Tools Search this Thread
Top Forums Web Development Changing Images in HTML
# 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 Smilie

---------- 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 Smilie
# 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 10:12 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash Script to find/sort/move images/duplicate images from USB drive

Ultimately, I'm looking to create a script that allows me to plug in a usb drive with lots of jpegs on it & copy them over to a folder on my hard drive. So in the process of copying I am looking to hash check them, record dupes to a file, copy only 1 of the identical files (if it doesn't exsist... (1 Reply)
Discussion started by: JonaQuinn
1 Replies

2. Shell Programming and Scripting

Difficulty cleaning references to duplicated images in HTML code

Hi, I need to search and replace references to duplicated images in HTML code. There are several groups of duplicated images, which are visually the same, but with different filenames. I managed to find the duplicated files themselves, but now I need to clean the code too. I have a CSV file with... (9 Replies)
Discussion started by: mdart
9 Replies

3. UNIX for Advanced & Expert Users

Mutt for html body and multiple html & pdf attachments

Hi all: Been racking my brain on this for the last couple of days and what has been most frustrating is that this is the last piece I need to complete a project. There are numerous posts discussing mutt in this forum and others but I have been unable to find similar issues. Running with... (1 Reply)
Discussion started by: raggmopp
1 Replies

4. Shell Programming and Scripting

Removing all except couple of html tags from html file

I tried to find elegant (or at least simple) way to remove all but couple of html tags from html file, but all examples I found dealt with removing all the tags. The logic of the script would be: - if there is <li> or <ul> on the line, do nothing (=write same line to output) - if there is:... (0 Replies)
Discussion started by: juubuntu
0 Replies

5. Shell Programming and Scripting

accepting images as a list and changing the name

Here is what I have so far #!/bin/bash while do read image jpegtopnm $image | pnmscale -height 200 | pnmtojpeg > $image-thumb echo $image-thumb shift done I sorta threw some pseudocode in there to demonstrate what I'm trying to do. . Where I am... (3 Replies)
Discussion started by: subway69
3 Replies

6. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

7. Shell Programming and Scripting

Referring to attached images in html email body through mailx

encoding type for images? (5 Replies)
Discussion started by: biswasbaishali
5 Replies

8. UNIX for Advanced & Expert Users

shellinabox/html help to insert a keypress with an html button

I am trying to use shellinabox as a terminal emulator. Everything is working except there seems to be no way to simulate an F14 button press in shellinabox. I am already embedding shellinabox in an html page so Im am wondering if there is a way to make an html/js button that will pass F14 to the... (0 Replies)
Discussion started by: syadnom
0 Replies

9. Web Development

html link to images in /tmp directory

Because of permission issues, I need to link to images in my web page which are stored in /tmp which of course is located in the root directory but my actual html page is much further down in another directory. I thought the the following code should work, but the image comes up as a broken link:... (2 Replies)
Discussion started by: Solerous
2 Replies

10. UNIX for Dummies Questions & Answers

How do I extract text only from html file without HTML tag

I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part. Same problem happens in "type" command in MS-DOS. I know you can do it by opening it in Internet Explorer,... (4 Replies)
Discussion started by: los111
4 Replies
Login or Register to Ask a Question