Discussion:
Adding to clipboard in Gecko
(too old to reply)
YatZeck
2004-12-31 09:20:10 UTC
Permalink
------------------
<SCRIPT>
function kopiuj() {
kod_hold.innerText = kod_copy.innerText;
Copied = kod_hold.createTextRange();
Copied.execCommand("RemoveFormat" );
Copied.execCommand("Copy");
}
</SCRIPT>

<TEXTAREA id="kod_hold" name="kod_hold" style="DISPLAY: none"></TEXTAREA>
<P name=kod_copy id=kod_copy>Kod pocztowy</P>
<button onclick=kopiuj();>Kopiuj >></button>
------------------

works well in MSIE. But Gecko doesn't run it:(

How to rewrite it for Gecko?


YatZeck
Justin Wood (Callek)
2004-12-31 20:28:48 UTC
Permalink
Post by YatZeck
------------------
<SCRIPT>
function kopiuj() {
kod_hold.innerText = kod_copy.innerText;
Copied = kod_hold.createTextRange();
Copied.execCommand("RemoveFormat" );
Copied.execCommand("Copy");
}
</SCRIPT>
<TEXTAREA id="kod_hold" name="kod_hold" style="DISPLAY: none"></TEXTAREA>
<P name=kod_copy id=kod_copy>Kod pocztowy</P>
<button onclick=kopiuj();>Kopiuj >></button>
------------------
works well in MSIE. But Gecko doesn't run it:(
How to rewrite it for Gecko?
YatZeck
Hmm, forgive me, but I dont think execCommand is a valid member via
spec, but could be wrong... [Though I'm not as familiar with DOM as I'd
like)

CC-ing and Followup-To: n.p.m.dom where it should have initially gone
(this isnt an html issue, just a dom issue run in html)

~Justin Wood, (Callek)

Loading...