ki Posted February 12, 2007 Share Posted February 12, 2007 How do you make it so if a user clicks a text box, it selects everything in it and adds it to the clipboard. Quote Link to comment Share on other sites More sharing options...
JP128 Posted February 12, 2007 Share Posted February 12, 2007 <html> <head> <script type="text/javascript"> function CopyToClipboard() { CopiedTxt = document.selection.createRange(); CopiedTxt.execCommand("Copy"); } </script> </head> <body> <form name="Form1"> <input type=text name="textbox"> <br /> <input type="button" onClick="CopyToClipboard()" value="Copy to clipboard" /> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
JP128 Posted February 12, 2007 Share Posted February 12, 2007 And by the way... it only works with IE explorer =/ Quote Link to comment Share on other sites More sharing options...
ki Posted February 12, 2007 Author Share Posted February 12, 2007 Ive seen it done on FF with photobucket Quote Link to comment Share on other sites More sharing options...
JP128 Posted February 12, 2007 Share Posted February 12, 2007 http://static.photobucket.com/include/js/copy-code.js thats photobuckets copy code... Quote Link to comment Share on other sites More sharing options...
ki Posted February 12, 2007 Author Share Posted February 12, 2007 http://static.photobucket.com/include/js/copy-code.js thats photobuckets copy code... uses flash? Quote Link to comment Share on other sites More sharing options...
weknowtheworld Posted February 12, 2007 Share Posted February 12, 2007 http://static.photobucket.com/include/js/copy-code.js thats photobuckets copy code... What is photobuckets? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 12, 2007 Share Posted February 12, 2007 photobucket is a free image host. You can upload images/videos to photobucket.com for free. However it has nothing to do with what you are aksing. But what JP meant to say is thats the javascript photobucket uses to copy text to the clipboard Quote Link to comment Share on other sites More sharing options...
ki Posted February 13, 2007 Author Share Posted February 13, 2007 photobucket is a free image host. You can upload images/videos to photobucket.com for free. However it has nothing to do with what you are aksing. But what JP meant to say is thats the javascript photobucket uses to copy text to the clipboard Yea I know but ti uses a flash app to do so doesnt it? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 13, 2007 Share Posted February 13, 2007 no, It uses javascript. Check the link out in JP128's post. That's the javascript photobucket uses to copy text in an input field to the clients clipboard. Quote Link to comment Share on other sites More sharing options...
ki Posted February 13, 2007 Author Share Posted February 13, 2007 I tried it, not working... It uses the flash application to copy, notice that it uses its vars for flash. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.