www.webdeveloper.com
Results 1 to 3 of 3

Thread: Code for Copy and Paste please

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Posts
    12

    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.

    Thanks, Tim

  2. #2
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,096
    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.

    http://www.webdeveloper.com/forum/sh...d.php?t=215507

    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.

  3. #3
    Join Date
    Nov 2012
    Posts
    1
    hi
    can you show me how to get a code at AddThis site ...I seem to be lost there.

    Thanks a lot.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles