[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Copy to clipboard script doesn't work in Firefox

Posted on 2012-04-04
5
Medium Priority
?
447 Views
Last Modified: 2012-04-04
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/
0
Comment
Question by:mel200
  • 3
  • 2
5 Comments
 
LVL 83

Expert Comment

by:leakim971
ID: 37808856
0
 

Author Comment

by:mel200
ID: 37808875
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
 
LVL 83

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 37808935
It use Adobe Flash.
So you want to use Adobe Flash?
0
 

Author Closing Comment

by:mel200
ID: 37808948
Nope, I don't want to use flash. Thanks for your help! I got my answer.
0
 
LVL 83

Expert Comment

by:leakim971
ID: 37808959
You're welcome. See you later.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Machine Learning is one of the profound applications of AI and therefore, just like AI, it is surrounded by myths and fears. Check out these facts about ML that demystify the related myths.
Even though starting and growing a lucrative business while you’re still in college sounds impossible, it is actually quite conceivable. There are several reasons why this is the perfect time to start a new venture.
The viewer will learn how to count occurrences of each item in an array.
Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

611 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question