Hey I am trying to figure out how to make multiple form fields send to clipboard. I know How to make on field but not multiple.
any ideas???? please help
Printable View
Hey I am trying to figure out how to make multiple form fields send to clipboard. I know How to make on field but not multiple.
any ideas???? please help
Have you tried concatenating your variables before sending the value to the clipboard?
This is what I have now from previous peoples efforts.
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
function el(tid) {return document.getElementById(tid);}
function copyit(){
var b = [];
b.push(el("t1").value);
b.push(el("t2").value);
b.push(el("t3").value);
b.push(el("t4").value);
var buffer = b.join(';');
CB(buffer);
document.execCommand("Copy")
copiedtext=window.clipboardData.getData("Text");
}
</script>
</head>
<body>
<input type="text" name="a1" value="" id="t1" />
<input type="text" name="a2" value="" id="t2" />
<input type="text" name="a3" value="" id="t3" />
<input type="text" name="a4" value="" id="t4" />
<BUTTON onClick="copyit();">Click here to Copy the contents </BUTTON>
</body>
This is the Java board not Javascript board. What you have posted is Javascript.