Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/04/2012, 09:40
Avatar de sneyder05
sneyder05
 
Fecha de Ingreso: enero-2009
Ubicación: Cali
Mensajes: 172
Antigüedad: 15 años, 3 meses
Puntos: 17
Mensaje Respuesta: Como ocupar if javascript html en Campos de lista

Saludos sergiogrs

Prueba con este código a ver si es lo que buscas

Código PHP:
<form name="form1" method="post" action="">
            <
p>
                <
label for="tamanop">Tamaño de Papel</label>
                <
select name="tamanop" id="tamanop" onchange="seleccion()">
                    <
option value="Carta">Carta</option>
                    <
option value="Oficio">Oficio</option>
                </
select>
            </
p>
            <
p>
                <
label for="tippapel">Tipo de Papel</label>
                <
select name="tippapel" id="tippapel" onchange="seleccion()">
                    <
option value="Papel Bond">Papel Bond</option>
                    <
option value="Opalina">Opalina </option>
                </
select>
            </
p>
            <
p>
                <
label for="tipimpre">Tipo de Impresión</label>
                <
select name="tipimpre" id="tipimpre" onchange="seleccion()">
                    <
option value="Color">Color</option>
                    <
option value="Blanco y Negro">Blanco y Negro</option>
                </
select>
            </
p>
            <
p>
                <
label for="total">Precio Total</label>
                <
input type="text" name="total" id="total">
            </
p>
        </
form>
        <
script language="javascript"
            function 
seleccion(){
                
tamanop document.getElementById('tamanop').value;
                
tippapel document.getElementById('tippapel').value;
                
tipimpre document.getElementById('tipimpre').value;
                
document.getElementById('total').value '';
                                
                if((
tamanop == "Carta") && (tippapel == "Papel Bond") && (tipimpre == "Blanco y Negro"))
                    
document.getElementById('total').value 1.5;
                else if((
tamanop == "Oficio") && (tippapel == "Opalina") && (tipimpre == "Color"))
                    
document.getElementById('total').value 2.5;
        
            }
        
</script> 
__________________
{
job: 'freelance',
contact: '[email protected]'
}