<img src="mypic.gif" border="0" onclick="document.getElementById('inputID').value+ ='text to add'"/> <input type="text" name="rs" size="35" value=""/>