I'm using DropDownListFor in my view:
<%: Html.DropDownListFor(model => model.Type,
new SelectList(ComponentsFactory.GetTypeList().Select(a => new { Name = Regex.Replace(a, @"^.*\.", ""), Value = a }).OrderBy(a => a.Name),
"Value", "Name", Model.Type), "Select . . .", null) %>
I also have a JQuery function in a .js scripts file that is already included in my header and everything:
function GetRequiredFields(type)
{
...//do JQuery AJAX stuff
}
I want to call "GetRequiredFields" with parameter "type" as the value of the selected item on select, and use it to update a 'div' named "RequiredFields". How can I do this? Do I need to use something other than Html.DropDownListFor?