[debutante] liste déroulante textarea
bonjour j'ai réellement besoin d'aide , je n'arrive pas a m'en sortir avec ce javascript...
je cherche a faire deux choses :( : lorsqu'on apuie sur un bouton alors on affiche une donnée dans un champs <TEXTAREA> ! et la deuxieme c'est lorsque l'on selectionne un élément d'une liste déroulante alors on affichequeleque chose dans un champs <textarea> :(
c'est avec onchange et onclick si j'ai bien compris mais je men sort pas ! :(
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
<script language="javascript"> function mail_client(affiche_mail) { <?php $nom ?> } </script>
<?php
echo "<select name='mail_client' >";
// num client est un champ " text "
$query_mail_cli = $dbconn_dns->query("SELECT email FROM contact_client,domainecoord WHERE domainenom='$domainenom' AND contact_client.numclient=domainecoord.numclient") ;
$nb_mail_cli = $dbconn_dns->num_rows($query_mail_cli) ;
for ($o=0;$o<$nb_mail_cli;$o++)
{
$client_mail = $dbconn_dns->fetch_array($o,$query_mail_cli) ;
$mail_cli = $client_mail[email];
echo "<option value='$mail_cli'> ".$mail_cli." </option>";
}
echo "</select>";
?>
<input type="button" name="ajout" onclick="mail_client(affiche_mail)" value="+"> |