Xula
04-06-2005, 03:55 AM
I've been looking for this for a bit now, asking person after person to no avail.
Here's the question I've been passing along, thanks to all who just read this
Anyone know how to copy text to the clipboard that is predefined?
<script language="JavaScript">
<!--
function CopyToClipBoard(post) {
polka = createTextRange(post);
polka.execCommand("Copy");
}
-->
</script>
is what I want, but that is apparently not working/I'm doing something wrong/haven't used javascript much...
all the examples online use forms for the data, such as:
function copyText(theText) {
var tempval=eval("document."+theText)
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")
alert("Text copied into the clipboard!");
but I want to do it purely with the data passed through the value 'post'...
Anyone have any ideas?
And if you get this, you can be so happy you stumped me, many friends, and two college-level teachers that I have asked
Thanks!
Here's the question I've been passing along, thanks to all who just read this
Anyone know how to copy text to the clipboard that is predefined?
<script language="JavaScript">
<!--
function CopyToClipBoard(post) {
polka = createTextRange(post);
polka.execCommand("Copy");
}
-->
</script>
is what I want, but that is apparently not working/I'm doing something wrong/haven't used javascript much...
all the examples online use forms for the data, such as:
function copyText(theText) {
var tempval=eval("document."+theText)
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")
alert("Text copied into the clipboard!");
but I want to do it purely with the data passed through the value 'post'...
Anyone have any ideas?
And if you get this, you can be so happy you stumped me, many friends, and two college-level teachers that I have asked
Thanks!