<html>
<textarea name=”textarea” id=”ilink”>choose and copy contents</textarea>
<br /><br/>
<input type=”button” value=”Select Text” onClick=”SelectContents(ilink)”>
<a href=”javascript:SelectContents(‘ipwd’)”>Select and Copy Password</a>
<script language=javascript>
function SelectContents(ilink)
{
document.getElementById(“ilink”).select();
var copyrange=document.getElementById(“ilink”).createTextRange();
copyrange.execCommand(“Copy”);
}
</script>
<html>
the above code copies contents from the textarea when we click on the “selelct all” anchor tag. But sadly this code works only for IE browser.how to ensure that this works for mozilla also. thanks for any help.