0

If I have a form like this:

<form action="" method="post">
    <select id="links" name="links">
        <option value="http://something.com">Link 1</option>
        <option value="http://somethingelse.com">Link 2</option>
    </select>
    <a href="#">Copy to Clipboard</a>
</form>

What would I need to add to it so a click on the linked text actually copied the selected value from the select box?

It could be jQuery or regular javascript, regardless...

thanks!

j08691
  • 190,436
  • 28
  • 232
  • 252
Crazy Serb
  • 76,496
  • 8
  • 33
  • 46
  • possible duplicate: http://stackoverflow.com/questions/400212/how-to-copy-to-the-clipboard-in-javascript – Ben Mar 14 '12 at 17:10

1 Answers1

2

There is a plugin for jQuery doing this, also You have to use flash for this 'coz it's not possible to do this in normal way.

Bartosz Grzybowski
  • 1,035
  • 9
  • 18