Código HTML:
<script language="javascript"> function iSubmitEnter(oEvento, oFormulario){ var iAscii; if (oEvento.keyCode) iAscii = oEvento.keyCode; else if (oEvento.which) iAscii = oEvento.which; else return false; if (event.keyCode == 13) { event.cancelBubble = true; event.returnValue = false; } if (iAscii == 13 && oFormulario.tomo.value == 0) popUpb('ejemplares.php') ; //Si es 0 el tomo abro pop-up if (iAscii == 13 && oFormulario.tomo.value != 0) oFormulario.registro.click(); //Si esta lleno el tomo registro } </script> <script> function popUpb(URL) { day = new Date(); id = day.getTime(); t=document.getElementById("ejemplar") eval("page" + id + " = window.open(URL+'?f='+t.value, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=500,left = 215,top = 120');"); } // End --> </script>