Duplicate static window content script initialization

3 posts, 1 answers
  1. Josh
    Josh avatar
    2 posts
    Member since:
    Sep 2012

    Posted 14 Dec 2012 Link to this post

    I have a question about duplicate static window content script initialization.

    Let's see an example:
    I have a KendowUI Window with static content:
    @Html.Kendo().Window().Name("Window").Content(@<div>
                <script type="text/javascript">
                    $(document).ready(function () {
                        alert('It\'s me!');
                    });
                </script>
                </div>).Visible(false).Modal(true).Title("Test").Draggable(false)

    So when I am opening page with provided code I see two alerts.

    Please help me to find different solution except provided below:
                <script type="text/javascript">
                    $(document).ready(function () {
                        alert('It\'s me!');
                    });
                </script>
    @Html.Kendo().Window().Name("Window").Content(@<div>
                </div>).Visible(false).Modal(true).Title("Test").Draggable(false)

    This is very important for me for initializing KendoUI controls inside of static window content.
  2. Answer
    Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 18 Dec 2012 Link to this post

    Hello Josh,

    The issue you experience should be fixed in the latest internal build. Could you please try to update and see if the problem persists?

    Kind Regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Josh
    Josh avatar
    2 posts
    Member since:
    Sep 2012

    Posted 18 Dec 2012 Link to this post

    Thank you, very much!

    Yes, after updating to the latest internal build version this issue not reproduced.

    Best Regards
Back to Top