recuperaTodos($rsBiblioteca,$stFiltro,"cod_biblioteca"); } $stJs .= " jQuery(\"#inCodBiblioteca\").empty().append(new Option(\"Selecione\",\"\")); \n"; foreach($rsBiblioteca->getElementos() as $value ) { $stJs .= "jQuery(\"#inCodBiblioteca\").append( new Option(\"".$value["nom_biblioteca"]."\", \"".$value["cod_biblioteca"]."\") ); \n"; } $stJs .= " jQuery(\"#inCodBiblioteca\").val(\"".$_REQUEST['inCodBiblioteca']."\"); \n"; return $stJs; } // Acoes por pagina switch ($stCtrl) { case "preencherBiblioteca": $stJs = preencherBiblioteca(); break; } if ($stJs != "") { echo $stJs; } ?>