开发者

How to include my javascript file after Telerik includes their javascript

开发者 https://www.devze.com 2023-03-22 22:56 出处:网络
I would like to override Tekerik\'s javascript function. To do that I want to include a file that contains modified javascript after Telerik\'s js include.

I would like to override Tekerik's javascript function. To do that I want to include a file that contains modified javascript after Telerik's js include.

I include my js files using ClientScriptManager.RegisterClientScriptBlock method. My files are included before Telerik's preventing me from overriding their function.

<script type="text/javascript" src="myScriptFile.js"></script>
<s开发者_如何学Ccript src="/atlas/Telerik.Web.UI.WebResource.axd?....></script>

How can I include my javascript file after Telerik's?


One option that I found is to use RegisterStartupScript method that

 "emits the script just before the closing tag of the Page object's <form runat= server> element."

which is after Telerik includes their files. This doesn't include a js file but at this point I can call a function that overrides Telerik's function.


Assuming you want to do this globally, had you considered editing the Telerik source file rather than overriding it?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号