Master Posted November 24, 2015 Report Share Posted November 24, 2015 How can I have slideshow in my HTML Page? Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted November 24, 2015 Report Share Posted November 24, 2015 You can try to add this to the header <script type="text/javascript"> var image1 = new Image() image1.src = "images/image1.jpg" var image2 = new Image() image2.src = "images/image2.jpg" </script> And the code below where you want to show the slide <p><img src="images/pentagg.jpg" width="500" height="300" name="slide" /></p> <script type="text/javascript"> function slideit() { var step=1; document.images.slide.src = eval("image"+step+".src") if(step<2) step++ else step=1 setTimeout("slideit()",2500); } slideit(); </script> Aurora 1 Quote Link to comment Share on other sites More sharing options...
0 skauntey Posted January 22, 2016 Report Share Posted January 22, 2016 MayMusic, Thanks for posting this. I have tried few variations of the script below - as you have indicated in your reply but with no success ! Am I doing anything wrong here? Script in Header: <script type="text/javascript">var image1 = new Image()image1.src = "[@field:Image_1/]"var image2 = new Image()image2.src = "[@field:Image_2/]"var image3 = new Image()image3.src = "[@field:Image_3/]"var image4 = new Image()image4.src = "[@field:Image_4/]"</script> Script in HTML Block ( I too have tried with footer) <p><img src="[@field:Image_1/]" width="500" height="300" name="slide" /></p> <script type="text/javascript"> function slideit() { var step=1; document.images.slide.src = eval("image"+step+".src") if(step<2) step++ else step=1 setTimeout("slideit()",500); } slideit(); </script> Thanks in advance. Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted January 27, 2016 Report Share Posted January 27, 2016 Where do you have this script, in details page? Where do you have images save at? Are these images, Image_1,Image_2, Image_3 and Image_4 fields in the table? Quote Link to comment Share on other sites More sharing options...
0 skauntey Posted January 27, 2016 Report Share Posted January 27, 2016 Thanks MayMusic, Yes these are the image fields in the table. A Caspio staff helped me to find and correct the issue. Best, Quote Link to comment Share on other sites More sharing options...
0 Master Posted January 29, 2016 Author Report Share Posted January 29, 2016 Where was the issue? Can you please tell us? Quote Link to comment Share on other sites More sharing options...
0 skauntey Posted January 30, 2016 Report Share Posted January 30, 2016 Hi Master, Please find working script below. Other than a change in timings (from 500 to 3500), bit of extra luck and help from Caspio, I can't spot much difference. My technical knowledge around coding etc.. is nearly zero hence I don't know what was the issue. Hope this helps Header: <script type="text/javascript"> var image1 = new Image() image1.src = "[@field:Image_1/]" var image2 = new Image() image2.src = "[@field:Image_2/]" var image3 = new Image() image3.src = "[@field:Image_3/]" var image4 = new Image() image4.src = "[@field:Image_4/]" </script> Added to an HTML Block: <p><img src="[@field:Image_1/]" width="650" height="400" name="slide" /></p> <script type="text/javascript"> var step=1; function slideit() { document.images.slide.src = eval("image"+step+".src") if(step<4) step++ else step=1 setTimeout("slideit()",3500); } slideit(); </script> Aurora 1 Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted February 4, 2016 Report Share Posted February 4, 2016 Thank you so much Quote Link to comment Share on other sites More sharing options...
0 Kurumi Posted May 13, 2022 Report Share Posted May 13, 2022 Hi everyone! Just wanted to share a new solution for Image Slideshows or Touch Slider if you have multiple images in your Details Page. You may try using this JS snippet of Swiper:https://swiperjs.com/get-startedhttps://swiperjs.com/demos Here's a sample result: Hope it helps! Quote Link to comment Share on other sites More sharing options...
0 Kurumi Posted August 27, 2022 Report Share Posted August 27, 2022 Hi everyone! Just wanted to share a new solution for Viewing images or Touch Sliders if you have multiple images in your Details/Report Page. You may try using this jQuery lightbox of Swipebox:http://brutaldesign.github.io/swipebox/https://github.com/brutaldesign/swipebox You can also use this to open video URL's from YouTube. Quote Link to comment Share on other sites More sharing options...
Question
Master
How can I have slideshow in my HTML Page?
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.