J'utilise un script php pour un petit livre d'or qui fonctionne plutot bien, sauf la fonction qui permet de rajouter un smilie dans le formulaire (comme ici, à gauche). Voici le code qui ne marche pas :
Code : Tout sélectionner
<form method="POST" name="form" action="livre_dor.php">
<input type="text" name="titrems" size="22" value="Titre du message" onclick="javascript:document.form.titrems.value='';">
<input type="text" name="pseudo" size="22" value="Pseudo/Nom" onclick="javascript:document.form.pseudo.value='';"><br>
<br>
<textarea style="font-size: 8 pt; font-family: Times new roman" rows="10" name="commentaire" cols="47"></textarea><br>
<img src="livredor-bts/2.gif" style="CURSOR: pointer" onClick="commentaire.value+=' [main] '">
<img src="livredor-bts/10.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [fume] '">
<img src="livredor-bts/3.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [cool] '">
<img src="livredor-bts/6.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [nul] '">
<img src="livredor-bts/1.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [waoo] '">
<img src="livredor-bts/0.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [dingue] '">
<img src="livredor-bts/9.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [triste] '">
<img src="livredor-bts/5.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [idee] '">
<img src="livredor-bts/11.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [mechant] '">
<img src="livredor-bts/4.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [perplexe] '">
<img src="livredor-bts/8.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [amigo] '">
<img src="livredor-bts/7.gif" style="CURSOR: pointer" onclick="commentaire.value+=' [love] '">
<INPUT TYPE="submit" value="Ajouter" name="submit">
</div></form>
Merci bcp
Oups: si vous voulez voir, c'est là : http://www.tultetar.be/content/livre_dor.php