Javascript Copy to clip board from text area

Hi Friends,
I need a copy to clipboard functionality from a text area using javascript. I use Zclip for the purpose,
but it will not work as needed . I attach my working code along with this … pls open index.html in browser
and try it . Do any one can pls give a javascript solution to copy textarea content to clipboard…
Download File :
Thanks,
Anes

There’s a lot of stuff going on; it’s hard to tell what might be going wrong. I wasn’t even sure how to test the code you provided. Can you simplify it at all?