Andy Goossens andygoossens at
Tue Jan 21 14:48:20 UTC 2003

On Monday 20 January 2003 23:40, Mat Colton wrote:
> Am Freitag, 3. Januar 2003 02:18 schrieb Andy Goossens:
> > * Like Dre said, do not require JavaScript. On a related note, *never*
> > use 'javascript:' or '#' links. (Unless '#' == top of the page, which is
> > allowed).
> Why not use "#"? XHTML handles it in a different manner than HTML, but it's
> still part of it. Even in XHTML 1.1 STRICT. What do you use to anchor
> stuff? Just out of curiosity.

<a href="#"></a> To go to the top of the page is OK.

<a href="#" onClick="goToLocation('page.html')"></a> Is wrong! Do not assume 
that everybody's browser has JavaScript support (enabled). What does the user 
see when he clicks that link and has no JS? Nothing, he sees the same page.
<a href="page.html" onClick="goToLocation('page.html'); return false;"></a> is 
*much* better...

// Andy Goossens

// Quote of the day:
And if you wonder,
What I am doing,
As I am heading for the sink.
I am spitting out all the bitterness,
Along with half of my last drink.

More information about the kde-www mailing list