Copy to clipboard script doesn't work in Firefox

Seems like a pretty simple code. Works in Internet explorer 9, (although it asks if you want IE to access your clipboard), but doesn't work in FF 8.01:

<script language="JavaScript">
function cbwrite (s) { window.clipboardData.setData("Text", s); }
</script>
<input name="" type="text" id="txt" value="CB25" /><input type="button" onClick="cbwrite(txt.value);" value="copy to clipboard">

Second question is, if I use this twice or more times on one page, with different values, would it continue to work? Thanks! It is in use here: www.wheelsonmeals.net/test/
mel200Asked:
Who is Participating?
 
leakim971PluritechnicianCommented:
It use Adobe Flash.
So you want to use Adobe Flash?
0
 
leakim971PluritechnicianCommented:
0
 
mel200Author Commented:
Ok, so that says it is a dumb idea and won't ever ever work. :)

But they do it here: http://www.retailmenot.com/

and that's sort of what I want to do. Any thoughts? Thanks!
0
 
mel200Author Commented:
Nope, I don't want to use flash. Thanks for your help! I got my answer.
0
 
leakim971PluritechnicianCommented:
You're welcome. See you later.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.