Submit button not firing

2 posts, 0 answers
  1. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 24 Jul 2014 Link to this post

    Hi
      I've been asked this by another developer but have no idea what the answer is

    Here we have a form with a submit button. When the button is a Kendo mobile button the form does not submit, when the kendo javascript is removed it does?
    I assume preventDefault() is getting called somewhere but not sure why?

    We have a workaround, just submit via javascript, but would be interested to know why

    thanks


    <form action="/EmployeeKiosk/Settings" id="form1" method="post" name="form1">
      <select id="Platform" name="Platform">
        <option selected="selected">Mobile</option>
        <option>Desktop</option>
       </select>

        <button id="acceptButton" type="submit"></button>
    </form>

    <script>
                    $('#acceptButton').kendoMobileButton();
            $( '#Platform' ).kendoDropDownList();
    </script>

  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 25 Jul 2014 Link to this post

    Hi Anthony,

    The submit is not fired, as it is being prevented by the Kendo UI code. It is done by design, as submit action can break the widget functionality in some scenarios.  As you said you can submit using JavaScript and it will practically do the same.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top