[pastebot-cvs] pastebot/templates paste-form.html,1.1,1.2
Status: Beta
Brought to you by:
rcaputo
From: <rc...@us...> - 2002-10-15 22:14:05
|
Update of /cvsroot/pastebot/pastebot/templates In directory usw-pr-cvs1:/tmp/cvs-serv19595/templates Modified Files: paste-form.html Log Message: Included yossarian's jscript code to fill the paste textarea from the clipboard. This only works on IE, though. Index: paste-form.html =================================================================== RCS file: /cvsroot/pastebot/pastebot/templates/paste-form.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** paste-form.html 18 May 2002 00:50:42 -0000 1.1 --- paste-form.html 15 Oct 2002 22:14:02 -0000 1.2 *************** *** 12,16 **** </p> <p> ! <form method='post' action='/paste' enctype='application/x-www-from-urlencoded'> <p> Channel: <select name='channel'>[% value name='channels' %]</select> --- 12,16 ---- </p> <p> ! <form method='post' action='/paste' enctype='application/x-www-from-urlencoded' name="pasteForm"> <p> Channel: <select name='channel'>[% value name='channels' %]</select> *************** *** 37,40 **** --- 37,51 ---- </p> </form> + + <!-- Automatically put the clipboard contents into the paste field. --> + <script language="jscript"> + onload=function () { + try { + document.pasteForm.paste.value=clipboardData.getData("Text") || ""; + } + catch (oErr) {} + } + </script> + </body> </html> |