This is a migrated thread and some comments may be shown as answers.

Duplicate static window content script initialization

2 Answers 104 Views
Window
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 14 Dec 2012, 04:28 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 18 Dec 2012, 08:46 AM
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!
0
Josh
Top achievements
Rank 1
answered on 18 Dec 2012, 04:00 PM
Thank you, very much!

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

Best Regards
Tags
Window
Asked by
Josh
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Josh
Top achievements
Rank 1
Share this question
or