Jump to content

Can you copy text to the clipboard


Timmie

Recommended Posts

In a Java Script can you create a string and then copy it to the clipboard so it can be pasted into another application?

What do you exactly mean?Do you mean code,what copies part of document's text to your clipboard?Or do you mean that can you copy piece of code,from here,and paste it to there using Ctrl+C?If so,yes it is possible.It is only text.However,you must create all needed codes for code what you just pasted to your document,if it needs any.
Link to comment
Share on other sites

This is the sort of thing I was looking for. That particular article though uses a function only available in IE. Is there anything that will work in Firefox too? I doesn't need to copy the text from the web page itself as I'll be creating the sting from various inputs on the page. So to rephrase the question: can you copy a string to the clipboard from any browser?

Link to comment
Share on other sites

Have a look at this site:http://www.jeffothy.com/weblog/clipboard-copy/quote from site

Pretty slick I’d say, he’s using a Macromedia Flash file to perform the copy on the Browser’s behalf (since Firefox/Netscape’s security settings do not allow access to the clipboard by default).
Google is your friend as someone once said, search for things like "javascript copy to clipboard firefox" :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...