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

ScriptRegistrar().OnDocumentReady in partialview

0 Answers 58 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.
Ben
Top achievements
Rank 1
Ben asked on 19 Jul 2012, 07:31 AM
Hey,

I have a little problem. I have a partial view that has a button wich opens a pop up. This popup contains 3 drop down boxes. The problem is that for some reason the 3th dropbox is disabled, but it gets enabled the moment you change the second dropbox. Because the values it contains than changes. In order to fix this I try using:

$(document).ready(function() {
         
        @{ Html.Telerik().ScriptRegistrar().OnDocumentReady("DoSiteChanging()");  }       
         
    });


And this function should be executed:

    function DoSiteChanging() {
 
        $('#Sites').trigger("valueChange");
        $('#Buildings').trigger("valueChange");
        $('#Rooms').trigger("valueChange");<
    }

    
But it never enters DoSiteChanging(), I tried debugging but it just never enters the javascript function
Tags
General Discussions
Asked by
Ben
Top achievements
Rank 1
Share this question
or