I can’t seem to get my head around ajax and json
I want to do a cascading dropdown and I am trying to get the data to a div to start off with. Here is the script
<script src="~/Scripts/jquery-ui-1.8.20.js"></script>
<script src="~/Scripts/jquery-ui-1.8.20.min.js"></script>
<script>
    $(function () {
        $('#funtiontype').change(function () {
            var selectedValue = $(this).val();
            $.ajax(
                {
                  // url: $(this).data('url'),
                  // source: "/EmployeeReps/GetDescription",
                url: "~/EmployeeReps/GetDescription",
                type: 'GET',
                cache: false,
                data: {value: selectedValue },
                success: function (result) {
                      $('#description').html(result.employeelist);
                     }
                });
            });
        });
</script>
And the controller
[AcceptVerbs(HttpVerbs.Get)]
        public ActionResult GetDescription(string value)
        {
            //get the data from DB
            var employeelist =(from s in db.tble_employeeReps where s.em_function==value 
                             select s);
            return Json(employeelist.ToList(), JsonRequestBehavior.AllowGet);
        }
the HTML @using (Html.BeginForm()) {
    <fieldset>
        <div class="editor-label">Function*</div>
        <div class="editor-field">
          <select id = "funtiontype">
               <option value = "">Please Select</option>
               <option value = "Finance">Finance</option>
               <option value = "Non-Finance">Non-Finance</option>
          </select>
        </div>
        <p></p>
        <p>
            <input type="submit" value="Vote" />
        </p>
    </fieldset>
    <div id="description"></div>
}
But I am struggling to get any data. Please can anyone help
Many thanks in advance Hesh
 
    