RobColborne
MIS
Hi
I was looking at an earlier thread that will copy a textbox contents to clipboard, but what I would like to do is copy a variable value to clipboard. How can this be done.
The script from the earlier post is as follows:
[script]
<html><body>
<form name="display">
<script language="JavaScript" type="text/javascript">
function toClipBoard(id){
r = document.getElementById(id).createTextRange();
r.select();
r.execCommand("COPY");
}
val="XYZ"
document.writeln("<input name='txt' id='fld' type='text' size='72' readonly value="+val+" />");
toClipBoard('fld')
</script>
</form></body></html>
[/script]
I was looking at an earlier thread that will copy a textbox contents to clipboard, but what I would like to do is copy a variable value to clipboard. How can this be done.
The script from the earlier post is as follows:
[script]
<html><body>
<form name="display">
<script language="JavaScript" type="text/javascript">
function toClipBoard(id){
r = document.getElementById(id).createTextRange();
r.select();
r.execCommand("COPY");
}
val="XYZ"
document.writeln("<input name='txt' id='fld' type='text' size='72' readonly value="+val+" />");
toClipBoard('fld')
</script>
</form></body></html>
[/script]