Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/01/2012, 11:13
Avatar de masterradio
masterradio
 
Fecha de Ingreso: octubre-2008
Mensajes: 31
Antigüedad: 15 años, 6 meses
Puntos: 0
Sonrisa Problemas para el boton de envio

Hola mis amigos no se si esto va aqui ya que es la primera vez que posteo si va en algun lugar mil disculpas!!!

amigos necesito de su ayuda tengo un problema con un formulario todo funciona bien pero al momento de ingresar los datos no puedo hacer que habra la ventana popup de los datos numericos que tengo ya que si el JS lo identifica tengo que dar clik en la imgen pero me gustaria que al dar enter tan bien habriera la ventana indicada. repito todo funciona bien solo ese problema tengo

espero me entiendan ya que no tengo experiencia en estos temas. gracias por su ayuda!!


html formulario


<form name="refip" id="refip" onSubmit="return setpage();">
<tr>
<td align="left" style="height: 22px; width: 33%"><div align="center"><span class="style1">Seleccionar y copiar el numero con las teclas. CTRL+C</a></span>
<input name="Submit" type="text" class="gt" style="font-size: 20px; color: rgb(0, 102, 204); background-color: rgb(244, 244, 244); font-family: Arial;" onKeyUp="refop()" value="# De celular" size="12" maxlength="8" onClick="this.value=''">

<br>
</span></font></div></td>
<td width="79%"><table width="109%" height="63" style="width: 100%">
<tr>
<td width="16%" id="uno"><div align="center"><a onClick="upuno()" class="gt"><img alt="texto1" src="http://www.forosdelweb.com/f127/images/gif1.gif" width="40" height="30"></a><a onClick="claropop()" class="gt"></a></div></td>
<td width="17%" id="dos"><div align="center"><a onClick="updos()" class="gt"><img alt="texto2" src="http://www.forosdelweb.com/f127/images/gif2.gif" width="40" height="30"></a></div></td>
<td width="17%" id="tres"><div align="center"><a onClick="uptres()" class="gt"><img alt="texto3" src="http://www.forosdelweb.com/f127/images/gif3.gif" width="40" height="30"></a><a onClick="movipop()" class="hand"></a></div></td>
</tr>




codigo js

// JavaScript Document


// opcion 1

var ref = new Array (
new Array ( 30000000 , 30289999 , "1" ),
new Array ( 40000000 , 40999999 , "1" ),
new Array ( 44760000 , 46999999 , "1" ),


// opcion 2

new Array ( 41000000 , 42999999 , "2" ),
new Array ( 47000000 , 47729999 , "2" ),
new Array ( 50100000 , 50199999 , "2" ),


// opcion 3

new Array ( 43000000 , 44759999 , "3" ),
new Array ( 50200000 , 50299999 , "3" ),
new Array ( 59150000 , 59179999 , "3" )
);


function ValidarOperador (numero){
for (p in ref){
if (numero >= ref[p][0] && numero <= ref[p][1])
return ref[p][2];
}
return "";
}

function foper(qnum){
if (qnum.length > 3) {
switch (qnum.length) {
case 4:
qnum = qnum *10000;
operador = ValidarOperador(qnum);
return operador;
break;
case 5:
qnum = qnum *1000;
operador = ValidarOperador(qnum);
return operador;
break;
case 6:
qnum = qnum *100;
operador = ValidarOperador(qnum);
return operador;
break;
case 7:
qnum = qnum *10;
operador = ValidarOperador(qnum);
return operador;
break;
case 8:
qnum = qnum *1;
operador = ValidarOperador(qnum);
return operador;
break;
}
}
}

var c=0;
var speed=200;
var bl=0;

function blink(cell){
if(c%2==0) {
cell.style.backgroundColor='#33FF33';
}
else {
cell.style.backgroundColor='#FFFF00';

}
c++;
cello=cell;
bl=setTimeout('blink(cello)',speed);
}


function refop() {
qnum = document.refip.Submit.value
opera = foper(qnum);
clearTimeout(bl);
cell = document.getElementById('uno')
cell.style.backgroundColor='#FFFFFF';
cell = document.getElementById('tres')
cell.style.backgroundColor='#FFFFFF';
cell = document.getElementById('dos')
cell.style.backgroundColor='#FFFFFF';
switch (opera) {
case '1':
blink(document.getElementById('uno'));
break;
case '3':
blink(document.getElementById('tres'));
break;
case '2':
blink(document.getElementById('dos'));
break;
default:
break;
}
return "";

}

function upuno(){
var winpops=window.open("index1.html","","width=328,he ight=568,resizable");
if(!winpops)
alert('Tu bloqueador de popups ha bloqueado la ventana, desactivalo por favor!');

}
function updos(){
var winpops=window.open("index2.html","","width=230,he ight=330,resizable");
if(!winpops)
alert('Tu bloqueador de popups ha bloqueado la ventana, desactivalo por favor!');
}

function uptres(){
var winpops=window.open("index3.html","","width=225,he ight=285,resizable");
if(!winpops)
alert('Tu bloqueador de popups ha bloqueado la ventana, desactivalo por favor!');
}



si me pudieran ayudar tambien que no se como hacer que de un aviso cuando se ingresa una numeracion que no est