This is a migrated thread and some comments may be shown as answers.

Start Slideshow automatically

5 Answers 206 Views
ImageGallery
This is a migrated thread and some comments may be shown as answers.
JULIE
Top achievements
Rank 1
JULIE asked on 08 May 2014, 03:51 PM
How do you start the slide show automatically on page load?

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 09 May 2014, 12:28 PM
Hello Julie,

You can turn on the slideshow functionality when the page loads by calling playSlideshow() method as demonstrated below:
<script type="text/javascript">
           function pageLoad() {
               $find('<%=RadImageGallery1.ClientID%>').playSlideshow();
               }
       </script>

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Voodoo
Top achievements
Rank 1
answered on 10 Nov 2014, 08:49 PM
Hi, using the method play slide show in JavaScript gives me
an error  “Error: Unable to get property
'playSlideshow' of undefined or null reference” but it does work, weird.

Do you know how to fix this?

-Thank you

<asp:PlaceHolder runat="server">

        <script type="text/javascript">

            function pageLoad() {

                var imageGallery = $find('<% = RadImageGallery1.ClientID %>');

                imageGallery.playSlideshow();

            }

        </script>

 </asp:PlaceHolder>

0
Pavlina
Telerik team
answered on 12 Nov 2014, 01:10 PM
Hi,

The code is working without errors on my end as you can see from the attached project. Give it a try and let me know what is the difference in your case.

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
WEBSRFR
Top achievements
Rank 1
answered on 05 Jan 2015, 06:18 PM
Thank you though how would this work if the slideshow controls are dynamically generated by the page? Would the JavaScript code also then need to be dynamically created and how could the JavaScript code start auto playing more than one Image Gallery Slideshow?

I feel the auto play property should really be one of the options when configuring the slideshow as it is basic functionality for a slideshow to auto play.
0
Pavlina
Telerik team
answered on 08 Jan 2015, 03:31 PM
Hi,

Yes, it will work if the slideshow controls are dynamically generated. 
In case you have more than one RadImageGallery control on the page and you need to start slideshow for all of the components, you should call the method for each of them.

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ImageGallery
Asked by
JULIE
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Voodoo
Top achievements
Rank 1
WEBSRFR
Top achievements
Rank 1
Share this question
or