tags:

views:

91

answers:

2

Hi,

I have the following link defined in a .NET 1.1 usercontrol that has the JQuery source file linked.

<script language="javascript" src="jquery.copy.min.js"></script>

<a href='#' onclick="javascript:$.copy('WORKED');">Copy to clipboard</a>

But nothing happens when I try to paste somewhere else???

Malcolm

A: 

I can think of three possibilities. First, perhaps you're missing the flash-file (used to do the actual copy). Second, perhaps you've got an ad-blocker keeping the flash-file from being loaded? Or, third, some security setting stopping the flash file from interacting with the clipboard.

This was just brain storming though. HTH.

roe
Very clever thankyou!
Malcolm
+3  A: 

I don't know .NET but if it's just html and javascript, shouldn't it be onclick="$.copy('WORKED');"? You only need "javascript:" if you put it in the href attribute.

Adrian Mester
This is correct. "javascript:" is used when it's put in the href attribute. on* attributes are treated as javascript always.
Cide