Respuesta: suma de selects aqui estan las funciones que utilizo para sacar el precion de pizzas y el precio de refrescos.
<script type="text/javascript">
function slctr(texto,valor){
this.texto = texto
this.valor = valor
}
var VE=new Array()
VE[0] = new slctr('- -VE- -')
VE[1] = new slctr("VEGrande",'VEGrande')
VE[2] = new slctr("VEMediano",'VEMediano')
VE[3] = new slctr("VEChica",'VEChica')
var NA=new Array()
NA[0] = new slctr('- -NA- -')
NA[1] = new slctr("Grande",'Grande')
NA[2] = new slctr("Mediano",'Mediano')
NA[3] = new slctr("Chica",'Chica')
var HA=new Array()
HA[0] = new slctr('- -HA- -')
HA[1] = new slctr("HAGrande",'HAGrande')
HA[2] = new slctr("HAMediano",'HAMediano')
HA[3] = new slctr("HAChica",'HAChica')
var PE=new Array()
PE[0] = new slctr('- -PE- -')
PE[1] = new slctr("PEGrande",'PEGrande')
PE[2] = new slctr("PEMediano",'PEMediano')
PE[3] = new slctr("PEChica",'PEChica')
var VG=new Array()
VG[0] = new slctr('- -VG- -')
VG[1] = new slctr("VGGrande",'VGGrande')
VG[2] = new slctr("VGMediano",'VGMediano')
VG[3] = new slctr("VGChica",'VGChica')
var AT=new Array()
AT[0] = new slctr('- -AT- -')
AT[1] = new slctr("ATGrande",'ATGrande')
AT[2] = new slctr("ATMediano",'ATMediano')
AT[3] = new slctr("ATChica",'ATChica')
var RO=new Array()
RO[0] = new slctr('- -RO- -')
RO[1] = new slctr("ROGrande",'ROGrande')
RO[2] = new slctr("ROMediano",'ROMediano')
RO[3] = new slctr("ROChica",'ROChica')
var TO=new Array()
TO[0] = new slctr('- -TO- -')
TO[1] = new slctr("TOGrande",'TOGrande')
TO[2] = new slctr("TOMediano",'TOMediano')
TO[3] = new slctr("TOChica",'TOChica')
var TQ=new Array()
TQ[0] = new slctr('- -TQ- -')
TQ[1] = new slctr("TQGrande",'TQGrande')
TQ[2] = new slctr("TQMediano",'TQMediano')
TQ[3] = new slctr("TQChica",'TQChica')
var ME=new Array()
ME[0] = new slctr('- -ME- -')
ME[1] = new slctr("MEGrande",'MEGrande')
ME[2] = new slctr("MEMediano",'MEMediano')
ME[3] = new slctr("MEChica",'MEChica')
var ES=new Array()
ES[0] = new slctr('- -ES- -')
ES[1] = new slctr("ESGrande",'ESGrande')
ES[2] = new slctr("ESMediano",'ESMediano')
ES[3] = new slctr("ESChica",'ESChica')
var SU=new Array()
SU[0] = new slctr('- -SU- -')
SU[1] = new slctr("SUGrande",'SUGrande')
SU[2] = new slctr("SUMediano",'SUMediano')
SU[3] = new slctr("SUChica",'SUChica')
var QB=new Array()
QB[0] = new slctr('- -QB- -')
QB[1] = new slctr("QBGrande",'QBGrande')
QB[2] = new slctr("QBMediano",'QBMediano')
QB[3] = new slctr("QBChica",'QBChica')
var AP=new Array()
AP[0] = new slctr('- -AP- -')
AP[1] = new slctr("APGrande",'APGrande')
AP[2] = new slctr("APMediano",'APMediano')
AP[3] = new slctr("APChica",'APChica')
//*******Nietos*******************
var VEGrande = new Array()
VEGrande[0] = new slctr("80",null)
var VEMediano = new Array()
VEMediano[0] = new slctr("65",null)
var VEChica = new Array()
VEChica[0] = new slctr("45",null)
var Grande = new Array()
Grande[0] = new slctr("85",null)
var Mediano = new Array()
Mediano[0] = new slctr("70",null)
var Chica = new Array()
Chica[0] = new slctr("45",null)
var HAGrande = new Array()
HAGrande[0] = new slctr("85",null)
var HAMediano = new Array()
HAMediano[0] = new slctr("70",null)
var HAChica = new Array()
HAChica[0] = new slctr("45",null)
var PEGrande = new Array()
PEGrande[0] = new slctr("85",null)
var PEMediano = new Array()
PEMediano[0] = new slctr("70",null)
var PEChica = new Array()
PEChica[0] = new slctr("45",null)
var VGGrande = new Array()
VGGrande[0] = new slctr("85",null)
var VGMediano = new Array()
VGMediano[0] = new slctr("70",null)
var VGChica = new Array()
VGChica[0] = new slctr("50",null)
var ATGrande = new Array()
ATGrande[0] = new slctr("85",null)
var ATMediano = new Array()
ATMediano[0] = new slctr("70",null)
var ATChica = new Array()
ATChica[0] = new slctr("50",null)
var ROGrande = new Array()
ROGrande[0] = new slctr("90",null)
var ROMediano = new Array()
ROMediano[0] = new slctr("75",null)
var ROChica = new Array()
ROChica[0] = new slctr("50",null)
var TOGrande = new Array()
TOGrande[0] = new slctr("90",null)
var TOMediano = new Array()
TOMediano[0] = new slctr("75",null)
var TOChica = new Array()
TOChica[0] = new slctr("50",null)
var TQGrande = new Array()
TQGrande[0] = new slctr("95",null)
var TQMediano = new Array()
TQMediano[0] = new slctr("80",null)
var TQChica = new Array()
TQChica[0] = new slctr("55",null)
var MEGrande = new Array()
MEGrande[0] = new slctr("100",null)
var MEMediano = new Array()
MEMediano[0] = new slctr("85",null)
var MEChica = new Array()
MEChica[0] = new slctr("55",null)
var ESGrande = new Array()
ESGrande[0] = new slctr("115",null)
var ESMediano = new Array()
ESMediano[0] = new slctr("95",null)
var ESChica = new Array()
ESChica[0] = new slctr("65",null)
var SUGrande = new Array()
SUGrande[0] = new slctr("125",null)
var SUMediano = new Array()
SUMediano[0] = new slctr("110",null)
var SUChica = new Array()
SUChica[0] = new slctr("75",null)
var QBGrande = new Array()
QBGrande[0] = new slctr("135",null)
var QBMediano = new Array()
QBMediano[0] = new slctr("110",null)
var QBChica = new Array()
QBChica[0] = new slctr("75",null)
var APGrande = new Array()
APGrande[0] = new slctr("145",null)
var APMediano = new Array()
APMediano[0] = new slctr("115",null)
var APChica = new Array()
APChica[0] = new slctr("75",null)
function slctryole(cual,donde){
if(cual.selectedIndex != 0){
donde.length=0
cual = eval(cual.value)
for(m=0;m<cual.length;m++){
var nuevaOpcion = new Option(cual[m].texto);
donde.options[m] = nuevaOpcion;
if(cual[m].valor != null){
donde.options[m].value = cual[m].valor
}
else{
donde.options[m].value = cual[m].texto
}
}
}
}
</script>
<script language="JavaScript">
function cambiar()
{
var index=document.forms.form1.refrescos.selectedIndex ;
form1.preciorefresco.length=0;
if(index==0) coca1();
if(index==1) coca2();
if(index==2) coca3();
if(index==3) coca4();
if(index==4) coca5();
if(index==5) coca6();
if(index==6) coca7();
if(index==7) coca8();
}
function coca1(){
opcion0=new Option("0","0","defauldSelected");
document.forms.form1.preciorefresco.options[0]=opcion0;
}
function coca2(){
opcion0=new Option("8","8","defauldSelected");
document.forms.form1.preciorefresco.options[0]=opcion0;
}
function coca3(){
opcion0=new Option("8","8","defauldSelected");
document.forms.form1.preciorefresco.options[0]=opcion0;
}
function coca4(){
opcion0=new Option("9","9","defauldSelected");
document.forms.form1.preciorefresco.options[0]=opcion0;
}
function coca5(){
opcion0=new Option("12","12","defauldSelected");
document.forms.form1.preciorefresco.options[0]=opcion0;
}
function coca6(){
opcion0=new Option("18","18","defauldSelected");
document.forms.form1.preciorefresco.options[0]=opcion0;
}
function coca7(){
opcion0=new Option("20","20","defauldSelected");
document.forms.form1.preciorefresco.options[0]=opcion0;
}
function coca8(){
opcion0=new Option("25","25","defauldSelected");
document.forms.form1.preciorefresco.options[0]=opcion0;
}
</script> |