Mam taki kod:
<form action="/admin/index.php?section=news&function=submit_add" method="post" enctype="multipart/form-data" name="form"> <script> function dodajtext (napis) { document.form.text.value+=napis; } </script>Dodawanie newsa | |
Tytuł : | <input type="text" name="tytul"> |
Text : | <textarea name="text" rows="5" cols="40"></textarea> |
Załączniki | |
Załącznik1: | <input name="plik1" type="file"> <input type="button" value="dodaj obrazek" onclick="dodajtext([img]#zalacznik1[/img])"> <input type="button" value="dodaj url"> |
Załącznik2: | <input name="plik2" type="file"> <input type="button" value="dodaj obrazek"> <input type="button" value="dodaj url"> |
Załącznik3: | <input name="plik3" type="file"> <input type="button" value="dodaj obrazek"> <input type="button" value="dodaj url"> |
<input type="submit" value="OK"> |
chce zrobic zeby po nacisnieciu przycisku dodal sie text do textarea (przykladem jest chociazby dodawanie tematu na tym forum). Co mam zle??