I have two input fields as under:
<input name="formtext" id="FormText" type="text" value="first field text" />
<input name="formname" id="FormName" type="text" value="second field text" oncopy="onCopyText()" />
Also I have got Javascript code as:
function onCopyText() {
document.getElementById('FormText').select();
}
I want to have first field's text selected when I copy the text value of second field. It selects the value of first field just fine but in my clipboard I have the value of first field copied instead of the value of second field. What wrong am I doing?