tags:

views:

35

answers:

1

Hi,

I have a .Net 1.1 webapp with a aspx page with the attribute SmartNavigation=true set.

I have a anchor in the page like this:

<a href='#' onclick="$.copy('ANNUAL PAID OZ');">Copy to clipboard</a>

Problem is when I click it the browser window scrolls to top.

Any ideas why??

Malcolm

A: 

because it's a link.
try:

<a href='#' onclick="$.copy('string'); return false;">Copy to clipboard</a>

(or better, use a function to do it, and bind it using jQuery. But this works too.)

Kobi