muestre en campos 5 campos mas (y sin resfrescar) los diferentes costos del productos seleccionado, para eso elegi la combinacion que me esta complicando, ya que desconozo si tengo otra opcion (sin refrescar).
Necesito ayuda, ya que me da error en la pagina, al cargar, la idea es armar un array en javascript, con los datos bajados de mysql.
Muchas gracias a todos.
Copio parte del codigo a continuación:
Código HTML:
<SCRIPT language="JavaScript" type="text/javascript"> function mostrar( form ){ var texto = "" texto += form.seleccion_id.value + "\n\r" form.areaTexto1.value = texto var texto2 = "" texto2 += form.seleccion_id.valor + "\n\r" form.areaTexto2.valor = texto2 } </SCRIPT> <tr> <td class="sub" width="1" height="1"><a class="frm"> Foto</td> <td class="sub" width="5" height="1"><a class="frm">Nro</td> <td class="sub" width="300" height="1"><a class="frm"> Datos</td> <td class="sub" width="62" height="1"><a class="frm">Cantidad</td> <td class="sub" width="21" height="1"><a class="frm">Contado</td> <td class="sub" width="53" height="1"><a class="frm">30/60</td> <td class="sub" width="25" height="1"><a class="frm">30/90</td> <td class="sub" width="25" height="1"><a class="frm">30/120</td> </tr> <tr> <td align="right" class="sub" width="5" height="1"><p style="word-spacing: 0; margin-left: 2; margin-right: 0; margin-top: 0; margin-bottom: 0" align="left"><img border="0" src="neogar.img_foto.jpg" width="16" height="15"></td> <td align="right" class="sub" width="5" height="1">*01</td> <td align="right" class="sub" width="350" height="1"> <select size="1" name="seleccion_id" class="imputbox" rows="25"> [PHP]<?$c=0; $seleccion_ida="3"; if ($seleccion_ida <> "") { $link = mysql_connect("$sql_host","$sql_usuario","$sql_pas s"); mysql_select_db("DATABASE", $link); $result = mysql_query("SELECT * FROM `productos` WHERE `prov_marca` LIKE '%$seleccion_ida%' ORDER BY `prov_marca`"); while ( $row=mysql_fetch_row($result)){$c=$c+1; ?> [/PHP]<SCRIPT language="JavaScript" type="text/javascript"> var c=c1; var selec_ id = new array(); var selec_costocontado = new array(); var selec_ id[c] = "<?echo $row[0]?>" var selec_costocontado[c] = "<?echo $row[4]?>"; var selec_costo3060[c] = "<?echo $row[5]?>"; var selec_costo3090[c] = "<?echo $row[6]?>"; var selec_costo30120[c] = "<?echo $row[7]?>"; </SCRIPT> <? ?><option value[PHP]="<?echo "$row[0]"?>"> <?echo "$row[10]**$row[1]**$row[13] ($row[12])";?>[/PHP]</option><? } }?> </select> <INPUT class="botones" TYPE="button" NAME="bot1" VALUE="Mostrar" onClick="mostrar( this.form )"> </td> <td class="listas" align="right" width="62" height="1"></td> <td class="listas" align="right" width="21" height="1"><input type="text" class="imputbox" NAME="areaTexto1" size="5"><input type="radio" value="contado" name="_0forma">*</td> <td class="listas" align="right" width="53" height="1"><input type="text" class="imputbox" NAME="areaTexto2" size="5"><input type="radio" value="3060" name="_0forma"></td> <td class="listas" align="right" width="25" height="1"><input type="text" class="imputbox" NAME="areaTexto3" size="5"><input type="radio" value="3090" name="_0forma"></td> <td class="listas" align="right" width="25" height="1"><input type="text" class="imputbox" NAME="areaTexto4" size="5"><input type="radio" value="30120" name="_0forma"></td> </tr>