Log in

View Full Version : How to create a box where if people click "copy" it will copy content inside the box.


koolfire
04-27-2008, 04:47 PM
Hi,

I want a box in which the following code should be there

<a href="register.php?referrerid=$bbuserinfo[userid]">$vboptions[bburl]/register.php?referrerid=$bbuserinfo[userid]</a>


And i want a button saying "Copy" and when someone clicks it.. It selects all the stuff and copies it [Ctrl C] automatically..

How can i do this?!?!?!?

henrikhansen
04-27-2008, 04:49 PM
Here is the javascript for it
http://www.dynamicdrive.com/dynamicindex11/selectform.htm