Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Copy to clipboard script doesn't work in Firefox

Posted on 2012-04-04
5
Medium Priority
?
439 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 82

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 82

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 82

Expert Comment

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

As computers become more powerful, jobs will be replaced with artificial intelligence, leaving no place in the future for humans in the workforce. In the oncoming technological revolution, the staggering change to human mind labor will prove the ski…
This article is written by John Gates, CISSP. Gates, the SNUG President-Elect, currently holds the position of Manager of Information Systems at Lake Park High School in Roselle, Illinois.
The Bounty Board allows you to request an article or video on any technical topic, or fulfill a bounty request to earn points. Watch this video to learn how to use the Bounty Board to get the content you want, earn points, and browse submitted bount…
Articles on a wide range of technology and professional topics are available on Experts Exchange. These resources are written by members, for members, and can be written about any topic you feel passionate about. Learn how to best write an article t…

721 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