public function registerScript($id, $name)
    {
        $view = $this->getView();
        AjaxDropdownAsset::register($view);
        $options = Json::encode($this->prepareOptions($name));
        $view->registerJs("jQuery('#$id').ajaxDropDown($options);");
    }