onkeyup="javascript:this.value=this.value.toUpperCase();" onkeypress="return soloAlfaNumerico(event);"/> </row> <row id="rowContenedor" collapsed="true"> <caption class="media" label="Unid/Empaque"/> <hbox> <toolbarbutton style="width: 32px !important" oncommand="CogeContenedor()" label="+"/> <textbox id="UnidadesxContenedor" value="2" onfocus="this.select()" style="width: 5em" onchange="validaDato(this,'nCont')" onkeypress="return soloNumerosEnteros(event,this.value)"/>/ <menulist flex="2" style="min-width: 8em" class="media" id="Contenedores" value="1"> <menupopup class="media" id="elementosContenedores"> <?php echo genXulComboContenedores("1", "menuitem", "def"); ?> </menupopup> </menulist> </hbox> </row> <row id="rowDatoContenedor" collapsed="true"> <caption id="txtContenedor" class="media" label="Empaque - Unid"/> <hbox flex="1"> <textbox class="media" id="Empaques" value="1" onfocus="this.select()" style="width: 8.5em" onkeypress="return soloNumerosEnteros(event,this.value)"/> - <textbox class="media" id="Unidades" value="0" onfocus="this.select()" style="width: 8em" onchange="validaDato(this,'nUnidEmp')"
query($sql); break; default: break; } //SE EJECUTA SIEMPRE echo "<groupbox> <caption label='Buscar Empaque:'/>"; echo "<hbox>"; echo "<textbox flex='1' id='buscacontenedor' onkeyup='BuscarContenedor(); if (event.which == 13) agnadirDirecto();' onkeypress='javascript: return soloAlfaNumerico(event)' /> "; echo "</hbox>"; echo "<hbox flex='1'>"; echo "<button flex='1' label='" . _("Nuevo") . "' onkeypress='if (event.which == 13) UsarNuevo()' oncommand='UsarNuevo()'/>"; echo "</hbox>"; echo "</groupbox>"; echo "<groupbox><caption label='Empaque:'/>"; $familias = genArrayContenedores(); $combo = ""; echo "<script>\n"; echo " var fam =new Object();\n"; foreach ($familias as $key => $value) { echo "fam[{$key}] = '{$value}';\n"; } echo "\n\t\tfunction UsarNuevo() {\n \n\t\t\tvar talla, url;\n\t\t\tvar nuevocolor = document.getElementById('buscacontenedor');\t\t\t\n\t\t\tif (nuevocolor)\n talla = nuevocolor.value;\n if (!talla || talla == '')\n return;\n \n\t\t\turl = 'selcontenedor.php';\n\t\t\turl = url +'?';\n url = url + 'modo';\n url = url + '=salvacontenedor';\n url = url + '&'+'contenedor=' + talla;\n\t\t\tdocument.location.href = url\t\t\t\n\t\t}\n\t\t\n\t\tfunction Eliminar() {\n\t\t\tvar contenedorname, url;\n\t\t\tvar lacontenedor = document.getElementById('buscacontenedor');\t\n\t\t\tif (lacontenedor) \n\t\t\t\tcontenedorname = lacontenedor.value;\n\t\t\tif (!contenedorname || contenedorname== '')\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\turl = 'selcontenedor.php';\n\t\t\turl = url +'?';\n url = url + 'modo';\n url = url + '=eliminacontenedor';\n url = url + '&'+'contenedor=' + contenedorname;\n\t\t\tdocument.location.href = url\t\t\t\t\t\t \t\t\t\n\t\t}\n\n function soloAlfaNumerico(e){ \n key = e.keyCode || e.which;\n tecla = String.fromCharCode(key).toLowerCase();\n letras = 'abcdefghijklmnopqrstuvwxyz-';\n especiales = [8, 13];\n tecla_especial = false\n for(var i in especiales){\n if(key == especiales[i]){\n tecla_especial = true;\n break;\n }\n }\n \n if(letras.indexOf(tecla)==-1) { \n if(!tecla_especial){\n return false;\n }\n }\n }\n\n\t\t\n "; echo "\n</script>"; echo "<script type='application/x-javascript' src='contenedor.js' />"; echo "<listbox id='Contenedor' rows='5' onclick='opener.changeContenedor(this,fam[this.value]);window.close();return true;'>\n"; echo genXulComboContenedores(); echo "</listbox>"; echo "<button label='" . _("Cerrar") . "' oncommand='window.close()'/>"; echo "</groupbox>"; EndXul();