i have no idea about js, so guess thats an easy one: on my form is a textarea "tags" and some links below. now i want this linktext in my formfield if someone clicks on it - as seen on del.icio.us on this "submit a site " page. so here is what i got so far: function addtag(tagname) { document.submitform.tags.value = document.submitform.tags.value + tagname; } Code (markup): <form action="submit.php" method="POST" id="submitform"> <table style="width:100%"> <tr> <td>URL:</td><td><input type="text" name="url" value="" size="60"></td> </tr> <tr> <td>Tags:</td><td><input type="text" id="tags" name="tags" size="60"><br> Common Tags: <a href="javascript:addtag('Free')">Free</a>, <a href="javascript:addtag('Paid')">Paid</a>, <a href="javascript:addtag('Recip')">Recip</a> </td> </tr> HTML: any ideas....?
change your line to this: document.forms['submitform'].tags.value = document.forms['submitform'].tags.value + tagname; Code (markup):