error on ajax_constantonoff function