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

[Solved] Executing JavaScript with LoadOnDemand

4 Answers 30 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dan
Top achievements
Rank 1
Dan asked on 07 Aug 2011, 08:06 PM
Hi.

I was wondering if there's any way to execute JavaScript code after a partial view gets loaded via PanelBar.LoadOnDemand.

Thanks!

Dan

4 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 09 Aug 2011, 07:15 AM
Hello Dan,

 This should be possible. Try to add a <script> element in your partial view which contains the required code.

All the best,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
Dan
Top achievements
Rank 1
answered on 09 Aug 2011, 09:48 AM
Actually, my problem is not adding JS to a partial view, but having a certain JS function called when the view is loaded. It could be something similar to Telerik().ScriptRegistrar().OnDocumentReady(), but specific for the partial view being loaded by the PanelBar.

Thanks!

Dan
0
Atanas Korchev
Telerik team
answered on 09 Aug 2011, 10:01 AM
Hello Dan,

 Have you tried my suggestion? The script block will be executed once the partial view is loaded.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
Dan
Top achievements
Rank 1
answered on 09 Aug 2011, 05:59 PM
You're absolutely right!
It works :)

Thanks!
Tags
PanelBar
Asked by
Dan
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Dan
Top achievements
Rank 1
Share this question
or