Button triggered on page load?

2 posts, 0 answers
  1. Alex
    Alex avatar
    2 posts
    Member since:
    May 2014

    Posted 29 May 2014 Link to this post

    Hello, I am trying to create a button function for my HomeController, and it works, however, the script immediately triggers on page load. I dont want it to trigger on page load, but instead, when the user presses the button. any idea of how to fix this?

    Here's the script snippets.

  2. Kiril Nikolov
    Kiril Nikolov avatar
    2598 posts

    Posted 30 May 2014 Link to this post

    Hi Alex,

    When you specify the click handler with the closing brackets it will be auto executed when the page loads. In order to pass arguments to the click handler you can do it via HTML attributes. Please check the attached example.

    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top