Re: How to have an "empty" hyperlink for javascript
by Ilya Dubinsky <ilya788(at)inter.net.il>
|
Date: |
Mon, 15 May 2000 11:29:18 +0200 |
To: |
jonblake(at)lw-oasis.org |
Cc: |
Lara Fabans <lara(at)flashcom.net>, hwg-languages(at)hwg.org |
References: |
0 |
|
todo: View
Thread,
Original
|
|
>There's one of two ways that I know how to do this.
>
><a href="javascript:someFunction( );">
>
> -or-
>
><a href="#" onClick="someFunction( );return true;">
>
>For some reason, I seem to like the first option better but I can't
>remember why. :) It's probably because on long pages it won't take you to
>the top of the page in some browsers like the second option. Other than
>that, I can't offer any reason one is better than the other.
If your function returns a value, it is better to use
<A HREF='javascript:void someFunction()'>someAction</A>
Yours, Ilya.
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA