Copy script:
Code:<SCRIPT language="JavaScript">
<!--
function highlightmetasearch() {
document.post.message.select(); document.post.message.focus();
}
function copymetasearch() {
highlightmetasearch();
textRange = document.post.message.createTextRange();
textRange.execCommand("RemoveFormat");
textRange.execCommand("Copy");
alert("This post has been copied to your clipboard.\nIf this post is lost when you submit it you can easily repost it.\nAlways use this feature before posting! - \nwww.able2know.com");
}
// -->
</SCRIPT>
Make sure to change the alert's wording. Also change this line:
Code:textRange = document.post.message.createTextRange();
"post" should be the name of the form.
"message" should be the name of the textarea
Code: <script language="JavaScript" type="text/javascript">
<!--
if ((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)) {
document.write('<INPUT type="button" class="button" value="COPY TO CLIPBOARD" onClick="copymetasearch();">');
} else {
document.write('<INPUT type="button" class="button" value="HIGHLIGHT TEXT" onClick="highlightmetasearch();">');
}
// -->
</script>
The paste script:
Code:<script>
function a2kpaste() {
var rng = document.selection.createRange();
rng.execCommand("paste");
}
</script>
The button
Code:<input type="button" class="button" value="Paste" onclick="document.post.message.focus(); a2kpaste();">
Make sure to change the button to reflect the form and field names as well.