[thelist] HTML question <dummy>

Mark Howells mark at mountain.ch
Wed Jan 16 08:55:54 CST 2002


>>> in your onclick add return false; at the end
>>> So you have : <a href="#" onclick="yourcomplicatedScript(); return
>> false;">
>>
>> Thanks that fixed it.
>> Peter
>
> Yes, that works, as long as you don't mind browsers that don't support
> javascript or have javascript turned off still linking to the base
> url.

That is to say, a link like this is better to make sure that non-JS 
browsers (and search engines) can follow the link.

<a href="myURL.html" onclick="window.open(this.href,'',''); return 
false">My Link</a>

Regards
Mark Howells
<http://www.mark.ac>





More information about the thelist mailing list