David Dorward <do*****@yahoo.com> writes:
<a href="JS-failed.html" onclick="return thisFunction()">
where thisFunction() has a suitable return statement.
This lets you deal with circumstances such as a function that uses W3C DOM
to dynamically add content. It would fail in Netscape 4 and IE 4, but a
plain return false wouldn't, so such users would get nothing (except JS
errors).
Well, if you have errors, the exection will never reach the "return
false", and the link would be followed anyway :)
Still, it's a good suggestion, as it allows the function to decide,
gracefully, to have the link followed.
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'