bonjour a tous, je n'arrive pas a recuperer les information de mon tableau js
je transforme un tableau php en variable js
j'appel ma fonction afficher dans le onchange de mon select
et je veux recuperer la valeur du tableau a l'indice x determiné par l'utilisateur
Merci de votre aide
Code:
<?
require_once('../../../scripts/fonctions.php');
list($annee,$mois,$jour)=split('-',date2sql(time()));
"var montant = new Array(" . implode(",", $Resmontant) . ");";
?>
<script language="javascript" type="text/javascript">
function afficher(nomForm,val,Txtmontant,Txtcom,tab_montant)
{
document.write(this.tab_montant[6]);
}
</script>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td>
<table border="2" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><b>Vos réservations au mois :</b></td>
<td><b>Montant des réservations :</b></td>
<td><b>Commissions engrangées :</b></td>
</tr>
<form name="f_choice" method="post" >
<tr>
<td><select name="Choixmois" onChange="afficher('f_choice',this.value,'montant','commission',montant)">';
<?
$i=01;
while($i<=$mois){?>
<option value="<?=$i?>"><?=mois($i)?> <?=$annee?></option>
<?
$i=$i+1;
if(strlen($i)!=2)$i='0'.$i;
}?>
</select>
</td>
<td><input="text" name="montant"></td>
<td><input="text" name="commission"></td>
</tr>
</form>
</table>
</td></tr>
</table>
je transforme un tableau php en variable js
j'appel ma fonction afficher dans le onchange de mon select
et je veux recuperer la valeur du tableau a l'indice x determiné par l'utilisateur
Merci de votre aide