Code for Copy and Paste please
Hi, I think this is probably easy, but I just don't know it.
My user will press a button to submit a high score. The high score is on the screen in a textbox, and also held in a variable on that page. When the button is pressed a new form opens up for him to enter name, email and a few other details including the score. What is the js code that will copy the score from the first page and then paste it into the receiving textbox on the new page?
To see it in action, go to rolloworks.co.uk/patterncatch play.html, select the screen called Driving, and click on Solutions.
I have a code but it is annoying as MS Internet Exploerer just makes a popup that warns off the visitor and it does not copy to the clipboard in Firefox.
The best one I have seen is on AddThis: www.addthis.com
Go through their short get button screen and you will see what I mean. It works cross-browser and does not prompt an alert in IE!
You can see the script I use on my latest site under site reviews. I've used it in an iframe code generator. I was too lazy to spend an hour figuring out the script that AddThis used.
I used a "Highlight and Select" script that I got off of either Dynamic Drive or DHTML Goodies... can't remember where I found it, but the header is intact so you can trace my steps.
can you show me how to get a code at AddThis site ...I seem to be lost there.
Thanks a lot.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)