All pastes #428944 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-07 22:47 UTC
rendered paste body
In the head...

<script type="text/javascript" language="JavaScript">
<!--
// Short and sweet!
function addSmilie(reference) {
	document.getElementById("data").value += reference
}
//-->
</script>

In the body...

<form name="postform" method="post" action="post.php">
  <table width="100%" border="0" cellspacing="0" cellpadding="6">
    <tr> 
      <td>Post by <?php echo $_SESSION["username"]; ?> on <?php echo date("m/d/y"); ?>: 
        <input name="subject" type="text" id="subject" size="30"> </td>
    </tr>
    <tr> 
      <td><p>
                  <textarea name="data" cols="60" rows="10" id="data"></textarea>
                </p>
                <p>Smilies: <img src="smilies/smile.gif" width="15" height="15" onclick="addSmilie(' :) ')"> <img src="smilies/biggrin.gif" width="15" height="15" onclick="addSmilie(' :D ')"> <img src="smilies/wink.gif" width="15" height="15" onclick="addSmilie(' ;) ')"> <img src="smilies/razz.gif" width="15" height="15" onclick="addSmilie(' :P ')"> <img src="smilies/sad.gif" width="15" height="15" onclick="addSmilie(' :( ')"> <img src="smilies/neutral.gif" width="15" height="15" onclick="addSmilie(' :| ')"> <img src="smilies/redface.gif" width="15" height="15" onclick="addSmilie(' :redface: ')"> 
                </p></td>
    </tr>
    <tr>
      <td><table width="0%" border="0" cellspacing="0" cellpadding="6">
                  <tr> 
                    <td><input name="send" type="submit" id="send" value="Submit"></td>
                    <td><input name="reset" type="reset" id="reset" value="Clear Form"></td>
                  </tr>
                </table></td>
    </tr>
  </table>
</form>