C# .NET - how to execute client side scripting after the page load in mvc3

Asked By chandu sekhar on 16-May-12 03:48 AM
Hi to All,
 
I am struggling with a problem in mvc. What my problem is i have a dropdown list and check box and  a button.
When I checked the check box the dropdown list will be disabled and vice versa. and then when I clicked the save button the changes updated in DB.I did all this but what my problem is after I checked my checkbox, when I click the save button the drop down list remains enable.

 I have written the code in client side java script.I am using mvc3.

I want to know the page refresh action in mvc3. please help me.

Thank you in advance.
here is my code


     $(function () {
       $('#AutoAdjustTimezone').change(function () {
         if ($(this).is(':checked')) {
           // disable the dropdown:
           $('#timezone').attr('disabled', 'disabled');
         } else {
           $('#timezone').removeAttr('disabled');   
        }
       });
     });
 
</script>

}
</script>  
Somesh Yadav replied to chandu sekhar on 16-May-12 03:54 AM

Calling $.validate.unobtrusive.parse() manually after the form has been loaded works

I found the solution here http://btburnett.com/2011/01/mvc-3-unobtrusive-ajax-improvements.html