I tried so many ways to implement this, but found the below snippet very useful(using zeroclipboard.js)
<html>
<body>
<script type=”text/javascript” src=”ZeroClipboard.js”></script>
<script type=”text/javascript”>
//set path
ZeroClipboard.setMoviePath(‘ZeroClipboard.swf’);
//create client
var clip = new ZeroClipboard.Client();
//event
clip.setHandCursor( true );
clip.addEventListener(‘mousedown’, function () {
clip.setText(document.getElementById(‘box-content’).value);
});
clip.addEventListener(‘complete’, function (client, text) {
alert(‘copied: ‘ + text);
});
//glue it to the button
clip.glue(‘copy’);
</script>
<textarea name=”box-content” id=”box-content” rows=”5″ cols=”70″>
Amit Mohanty Blog is the best blog around!
</textarea>
<br />
<br />
<p>
<input type=”button” id=”copy” name=”copy” value=”Copy to Clipboard” />
</p>
</body>
</html>
Make sure to include both files Zeroclipboard.js and ZeroClipboard.swf
That’s it.
I truly love your website.. Pleasant colors & theme.
Did you develop this amazing site yourself? Please
reply back as I’m hoping to create my very own website and want to find out
where you got this from or what the theme is called.
Many thanks!
LikeLike
Appreciation to my father who told me about this website, this web site is actually amazing.
LikeLike
I used to be able to find good info from your content.
LikeLike
I have been explooring for a little bit forr any high-quality
articles or weblog posts on this sort of house .
Exploring in Yahoo I at laast stumbled upon this website. Reading this info So i’m happy to exhibit
that I have a very just right uncanny feeling I found out exactly what
I needed. I such a lot indisputably will make sure
to do not disregard this site and give it a look regularly.
LikeLike
Hello superb website! Does running a blog similar to this require a lot of work?
I have absolutely no expertise in computer programming
but I had been hoping to start my own blog in the near future.
Anyhow, if you have any suggestions or techniques for new blog owners please share.
I know this is off topic however I just wanted
to ask. Many thanks!
LikeLike
Have you ever thought about adding a little bit more than just your articles?
I mean, what you say is valuable and all. But think
of if you added some great images or video clips to give your posts
more, “pop”! Your content is excellent but with pics and video clips, this
site could definitely be one of the most beneficial in its field.
Awesome blog!
LikeLike
Hello! Do you know if they make any plugins to protect against hackers?
I’m kinda paranoid about losing everything I’ve worked hard on.
Any recommendations?
LikeLike
Very good info. Lucky me I came across your blog by accident (stumbleupon).
I’ve book marked it for later!
LikeLike
This page certainly has all the info I needed concerning this subject and didn’t know who to ask.
LikeLike
I was able to find good advijce from your articles.
LikeLike
My brother suggested I might like this web site. He
was entirely right. This post truly made my day.
You cann’t imagine simply how much time I had spent for this information!
Thanks!
LikeLike
Thanks…very good blog
LikeLike
Excellent post! We will be linking to this particularly great content on our site. Keep up the great writing.
LikeLike