alert message on initial load

4 posts, 0 answers
  1. David
    David avatar
    276 posts
    Member since:
    Mar 2014

    Posted 06 Aug 2018 Link to this post

    The following code produces 'test' message on initial load, before actual click.

     

      <telerik:RadImageTile ID="ritTREDAIR" Name="TREDAir"
                                       Height="385" Width="340px"
                                       runat="server"
                                       OnClientClicking="alert('test')">
                        <Title Text="TREDAir"></Title>
      </telerik:RadImageTile>

    Am i doing something wrong?

  2. Vessy
    Admin
    Vessy avatar
    2067 posts

    Posted 07 Aug 2018 Link to this post

    Hi David,

    In order to pop an alert in the handler of the OnClientClicking method of the ImageTile you have to wrap it inside a function, otherwise it will pop when the page is loaded. You can find more details on the matter here: https://docs.telerik.com/devtools/aspnet-ajax/getting-started/customize-control-behavior

    For example:
    <telerik:RadImageTile ID="ritTREDAIR" Name="TREDAir"
        Height="385" Width="340px"
        runat="server"
        OnClientClicking="function(){alert('test')}">
        <Title Text="TREDAir"></Title>
    </telerik:RadImageTile>

    Regards,
    Vessy
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. David
    David avatar
    276 posts
    Member since:
    Mar 2014

    Posted 07 Aug 2018 in reply to Vessy Link to this post

    Works!

    Thank you

  4. Vessy
    Admin
    Vessy avatar
    2067 posts

    Posted 08 Aug 2018 Link to this post

    Hi,

    You are welcome, David - I am glad my reply was helpful for you.

    Regards,
    Vessy
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top