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

Remove javascript when close modal

1 Answer 412 Views
Window
This is a migrated thread and some comments may be shown as answers.
Francesco
Top achievements
Rank 1
Francesco asked on 18 Jan 2013, 09:16 AM
Hi,
i create a modal window and load in it an html file. in the html file there is a script.
when i close the window i use destroy() and remove()
but the script that there was in the modal window remains on the principal page..

how can i do for to destroy the script?


Thank you

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 21 Jan 2013, 05:10 PM
Hi Francesco,

I suggest you to select the script element (probably by id or via more complex selector) and remove it from the DOM through the remove method. The approach is analogical to the way you remove widget's elements from the DOM.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
Francesco
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or