Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/09/2005, 09:55
Avatar de JuanKa
JuanKa
 
Fecha de Ingreso: septiembre-2004
Mensajes: 468
Antigüedad: 20 años, 4 meses
Puntos: 1
Te comento que el error me persiste he colocado el id="txt_Cantidad" en el input

con la funcion que tu me digistes:

************************************************** ****
function cantidad_comprar(){
var tit = document.forms['frmCantidad']['txt_cantidad'].value;
if (parseInt(tit) > 10){
alert ('\nPara realizar compras superiores a 11 Unidades por artículo,\n\n\t Por favor contactenos con nosotros.\n\n\t\t Gracias');
return false;
} else {
document.forms['frmCantidad'].submit();
return true;
}

}
************************************************

No recogo el valor de tit, pero con la funcion que postee:

************************************************
function cantidad_comprar(){
var tit = document.getElementById("txt_cantidad").value;
alert(tit);
if (parseInt(tit) > 10){
alert ('\nPara realizar compras superiores a 11 Unidades por artículo,\n\n\t Por favor contactenos con nosotros.\n\n\t\t Gracias');
return false;
} else {
document.forms[1].submit();
return true;
}

}
**********************************************

SI RECOGO EL VALOR, PERO CUANDO LOS ARTICULOS SON VARIOS SIEMPRE RECOJO EL VALOR DE 1, Y CUANDO EN LA RELACION DE ARTICULOS ES 1 COLOCO CUALQUIER COLOR Y SI ME LO ACEPTA.

REPITO MI PROBLEMA ES CUANDO LA CATEGORIA TIENE VARIOS ARTICULOS SIEMPRE RECOJO EL VALOR DE 1.


Haber si me pueden ayudar.

GRACIAS