Prasad Prasad - 2 years ago 128
Javascript Question

Trigger change event of dropdown

I want to trigger the change event of dropdown in $(document).ready using jquery.

I have a cascading dropdown for country and state in user details page. how can i set the value (which is taken from DB based on the user id) for country and state in MVC with C#.

Answer Source

I don't know that much JQuery but I've heard it allows to fire native events with this syntax.


       // Your event handler

    // And now fire change event when the DOM is ready

More information here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download