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

[Solved] Regarding ScriptRegistrar

1 Answer 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
saroj
Top achievements
Rank 1
saroj asked on 17 Feb 2012, 04:16 AM

Hi Telerik

I am using the below code in my layout three times one inside header, one inside footer and one out side footer. Does it necessary to use the same code in three places in one page? If i don't use these in these three places then some of my funcioality doesn't work. For example: if i don't use that code in header section then my dropdown menu bar doesn't work, if i don't put in footer thenn popup window doesn't work when clicked to footer link. please need your advice on these. 

@(Html.Telerik().ScriptRegistrar()

.DefaultGroup(group => group.DefaultPath(

 

"~/Scripts/2011.3.1408")

 

.Compress(

 

true))

 

.jQuery(

 

false)

 

)

Thanks
Saroj

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 17 Feb 2012, 01:04 PM
Hi Saroj,

Normally you need only one ScriptRegistrar, but based on the provided information, I am not able to tell what the problem is.

it is best to place the ScriptRegistrar before the closing </body> tag. Make sure that all your custom scripts that rely on the ScriptRegistrar are executed after the Telerik scripts (e.g. use document.ready, the components' OnLoad handlers, etc)

All the best,
Dimo
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
saroj
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or