I have some problems with LMC Button because of the way it is coded.
ShowLMCButton('Copied Text Here');
An image "Copy" is loaded when the page loads, with the words "Copied Text Here" being copied to clipboard when the image is clicked on.
If I do this:
var text = "New Text";
ShowLMCButton(text);
The words "New Text" is copied to the clip no problem, but the variable text have to be there on page load. There is no way I can change the words.
This is the ShowLMCButton function
function ShowLMCButton(cliptext, capt, js, furl)
{
var params = 'txt=' + encodeURIComponent(cliptext);
if (!isNotEmpty(furl)) { furl = "clippy/lmcbutton.swf"; }
if (isNotEmpty(capt)) { params += '&capt=' + capt; }
if (isNotEmpty(js)) { params += '&js=' + js; }
document.write('<object width="40" height="20">');
document.write(' <param name="movie" value="' + furl + '">');
document.write(' <PARAM NAME=FlashVars VALUE="' + params + '">');
document.write(' <embed src="' + furl + '" flashvars="' + params + '" width="40" height="20"></embed>');
document.write('</object>');
//alert('file: ' + furl + ' Params: ' + params); // debug
}
How can I copy text that I type in a textarea/input textfield?