Copy text
Posted: Thu Dec 13, 2007 3:06 am
feyd | Please use
Thanks
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
Any ideas how to het the following to work within firefox with same functionality (text doesnt have to be highlighted)
[syntax="javascript"]<script language="JavaScript">
function ClipBoard()
{
holdtext.innerText = copytxt.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}
</SCRIPT>
<textarea name="copytxt"><a href="#">Link</a></textarea><button onClick="ClipBoard();">Copy to Clipboard</button><br />
<textarea ID="holdtext" STYLE="display:none;">
</textarea>feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]