function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vigneshwaran LoganathanVigneshwaran Loganathan 

Hi all

I have a question,

I want to create a Visualforce Page in which I need to change 10 images dynamically at an intervel of 5 seconds (like in http://msn.com)..

Is it possible??
Best Answer chosen by Vigneshwaran Loganathan
sfdc550sfdc550
<apex:page >
<html>
<script type="text/javascript">
var slideimages=new Array()
function slideshowimages()
{

     for (i=0;i<slideshowimages.arguments.length;i++){
         slideimages[i]=new Image()
         slideimages[i].src=slideshowimages.arguments[i]
    }
}
</script>

<img src="{!$Resource.image2}" alt="Slideshow Image Script" title="Slideshow Image Script" name="slide" border="0" width="200" height="200"/><a href="http://hscripts.com" style="text-decoration:none;cursor:pointer;font-size:12px;color:green;">H</a>
<script type="text/javascript">
slideshowimages("{!$Resource.image2}","{!$Resource.image1}")
var slideshowspeed=2000
var whichimage=0
function slideit()
{
     if (!document.images)
           return
     document.images.slide.src=slideimages[whichimage].src
     if (whichimage<slideimages.length-1)
              whichimage++
     else
              whichimage=0
      setTimeout("slideit()",slideshowspeed)
}
 slideit()
</script>
<!-- Script by hscripts.com -->
</html>
</apex:page>


Note: Replace image urls.

change slideshowspeed time thats it you can easily it will roll on images on ur site. If u want by clicking u can make url redirected to that image page also

All Answers

Vigneshwaran LoganathanVigneshwaran Loganathan
Hi karanraj,

Thanks for the reply but I am afraid I could not get the answer clearly..

The link is all about GROUP BY ROLLUP..

I need to change th images dynamically at a purticular interval..
SF AdminSF Admin

Hi VL,

There are many jquery plugins available 

Check this link: http://www.jssor.com/demos/simple-fade-slideshow.html

Regards,
MOhd

sfdc550sfdc550
<apex:page >
<html>
<script type="text/javascript">
var slideimages=new Array()
function slideshowimages()
{

     for (i=0;i<slideshowimages.arguments.length;i++){
         slideimages[i]=new Image()
         slideimages[i].src=slideshowimages.arguments[i]
    }
}
</script>

<img src="{!$Resource.image2}" alt="Slideshow Image Script" title="Slideshow Image Script" name="slide" border="0" width="200" height="200"/><a href="http://hscripts.com" style="text-decoration:none;cursor:pointer;font-size:12px;color:green;">H</a>
<script type="text/javascript">
slideshowimages("{!$Resource.image2}","{!$Resource.image1}")
var slideshowspeed=2000
var whichimage=0
function slideit()
{
     if (!document.images)
           return
     document.images.slide.src=slideimages[whichimage].src
     if (whichimage<slideimages.length-1)
              whichimage++
     else
              whichimage=0
      setTimeout("slideit()",slideshowspeed)
}
 slideit()
</script>
<!-- Script by hscripts.com -->
</html>
</apex:page>


Note: Replace image urls.

change slideshowspeed time thats it you can easily it will roll on images on ur site. If u want by clicking u can make url redirected to that image page also
This was selected as the best answer