Old and needy- help me please :D

Well let me tell you I about DEMENTED here!

I used a code from W3 only to find after all the updating it did not work…I will post the full html here:

This is the only bit of code that interests me…driving me mad! Not showing any of the 35 images, so I am guessing it has to be an error in W3 script.

Any help, pointers or other options will be gratefully received. Be nice, only been at the training myself situation for 8 weeks and I am old :stuck_out_tongue:

Thanks in advance.
L xxx

var slideIndex = 0;

function showSlides() {
  var i; var slides = document.getElementsByClassName("mySlides");var dots = document.getElementsByClassName("dot");
  for (i = 0; i < slides.length; i++) {
    slides[i].style.display = "none";  
  if (slideIndex > slides.length) {slideIndex = 1}    
  for (i = 0; i < dots.length; i++) {
    dots[i].className = dots[i].className.replace(" active", "");
  slides[slideIndex-1].style.display = "block";  
  dots[slideIndex-1].className += " active";
  setTimeout(showSlides, 5000); // Change image every 5 seconds
} ```

Do you have an actual HTML Element with a class name of ‘mySlides’ and another one with a class name of ‘dots’?
Maybe like this?:

<div class='mySlides'>
    <img class='dots' src='' alt=''>

It would help if you started by telling us what you expect the code to do vs. what it is doing that you do not want or need it to do.