I am trying to copy some text in an entry field to the windows clipboard, using some code I found in another thread. It won't work - any ideas? Here is the essential code fragment:
Clive
Code:
<html><body>
<form name="display">
<script language="JavaScript" type="text/javascript">
function toClipBoard(id){
r = document.body.createControlRange();
r.add(document.getElementById(id));
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>
Clive