Copy to clipboard

G

Gernot Frisch

How can I put text from a <textarea name="test"></textarea> into my
clipboard (Windows, Firefox+IE).

--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}

________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
 
M

McKirahan

Gernot Frisch said:
How can I put text from a <textarea name="test"></textarea> into my
clipboard (Windows, Firefox+IE).

Will this help -- for IE anyway?

<html>
<head>
<title>clipboard.htm</title>
<script type="text/javascript">
function copy(what) {
window.clipboardData.setData('Text',what.value);
}
function paste(what) {
what.value = window.clipboardData.getData('Text');
}
</script>
</head>
<body>
<form>
<textarea name="data" cols="50" rows="10"></textarea>
<br>
<input type="button" value="Copy" onclick="copy(this.form.data)">
<input type="button" value="Paste" onclick="paste(this.form.data)">
<input type="reset" value="Clear">
</form>
</body>
</html>
 
G

Gernot Frisch

Will this help -- for IE anyway?

<html>
<head>
<title>clipboard.htm</title>
<script type="text/javascript">
function copy(what) {
window.clipboardData.setData('Text',what.value);
}
function paste(what) {
what.value = window.clipboardData.getData('Text');
}
</script>
</head>
<body>
<form>
<textarea name="data" cols="50" rows="10"></textarea>
<br>
<input type="button" value="Copy" onclick="copy(this.form.data)">
<input type="button" value="Paste" onclick="paste(this.form.data)">
<input type="reset" value="Clear">
</form>
</body>
</html>


"Clear" works ;)
No, I can't get clipboard to work on firefox (1.5.0) with that. Nor
did I see any solution in the internet that works :(
-Gernot
 
R

Randy Webb

Gernot Frisch said the following on 3/13/2006 11:24 AM:
No. But I missed the "firefox" part ;)

That is because Firefox does not give you access to the clipboard - if
the UA/OS even have one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top