[GRLUG] clipboard query

Eric Beversluis ebever at researchintegration.org
Thu Mar 21 21:54:34 EDT 2013


On Thu, 2013-03-21 at 21:29 -0400, Kyle wrote:
> On 03/20/2013 09:06 PM, Eric Beversluis wrote:
> > I'm looking at
> > http://net.tutsplus.com/tutorials/javascript-ajax/exactly-how-to-create-a-custom-jquery-accordion/.
> >
> > Each bit of code there has a prompt "copy to clipboard" and when you
> > click it, an alert tells you the code is now on the clipboard. But when
> > I try to paste it into a text editor, nothing pastes. What am I missing?
> > Or is it just broken?
> >
> > Thanks.
> >
> > _______________________________________________
> > grlug mailing list
> > grlug at grlug.org
> > http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
> >
> 
> Having written a script for "Copy to Clipboard" before, I found that
> every major browser except Internet Explorer had blocked the ability to
> copy to the clipboard programmatically for security purposes.  I ended
> up having to do a browser detect to see if it was running under IE
> before showing the button.  Granted, that was a few years ago now and
> things may have changed, but I wouldn't be surprised if that's what
> you're seeing.
> 
> - Kyle
I'm thinking that a 'copy to clipboard' function that didn't require one
to select first would have limited use anyway, since it would only be
useful for the whole code snippet, and in lots of cases people might
only want to copy and paste part of the code snippet anyway.




More information about the grlug mailing list