title: Javascript callback function throws error "Callback is not a function" in firefox
body: <pre><code>function CascadeDropDowns(parentClass, childClass, action, callback) {
    var DropDownId = $(parentClass + " option:selected").val();
  
    $.ajax({
      url: "/site/" + action,
      data: { DropDownId: DropDownId },
      dataType: "json",
      type: "POST",
      error: function () {
        alert("An error occurred.");
      },
      success: function (data) {
        var items = "";
        $.each(data, function (i, item) {
          items += "&lt;option value=\"" + item.Value + "\"&gt;" + item.Text + "&lt;/option&gt;";
        });
        $(childClass).html(items);
        $(childClass)[0].selectedIndex = 0;
        callback();
      }
    });
  }
  
  $(document).ready(function () {
    // Populates all child drop downs on load
    var callback = function () {
      CascadeDropDowns(".ConfigGroupDDL", ".ConfigNameDDL", "GetParameters");
    };
  
    CascadeDropDowns(".DeviceTypeDDL", ".ConfigGroupDDL", "GetGroups", callback);
  
    // Populates all child drop downs parent change
    $(".DeviceTypeDDL").change(function () {
      var callback = function () {
        CascadeDropDowns(".ConfigGroupDDL", ".ConfigNameDDL", "GetParameters");
      };
      CascadeDropDowns(".DeviceTypeDDL", ".ConfigGroupDDL", "GetGroups", callback);
    });
    $(".ConfigGroupDDL").change(function () {
      CascadeDropDowns(".ConfigGroupDDL", ".ConfigNameDDL", "GetParameters");
    });
  });
  </code></pre>
  
  <p>This runs fine and cascades the dropdowns in the right order, but firefox debugger shows an error and ie throws an alert and asks if Id liek to debug. </p>
  
  <p>Any advice would be great</p>