Start Slideshow automatically

6 posts, 0 answers
  1. JULIE
    JULIE avatar
    2 posts
    Member since:
    Oct 2012

    Posted 08 May 2014 Link to this post

    How do you start the slide show automatically on page load?
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 09 May 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Voodoo
    Voodoo avatar
    4 posts
    Member since:
    Aug 2007

    Posted 10 Nov 2014 Link to this post

    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>

  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 12 Nov 2014 Link to this post

    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.

     
  6. WEBSRFR
    WEBSRFR avatar
    14 posts
    Member since:
    Mar 2004

    Posted 05 Jan 2015 in reply to Pavlina Link to this post

    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.
  7. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 08 Jan 2015 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017