You are here: Re: does Opera have an issue with <href="#"> ....? « HTML « IT news, forums, messages
Re: does Opera have an issue with <href="#"> ....?

Posted by Jukka K. Korpela on 03/25/07 10:24

Scripsit Toby A Inkster:

> The new behaviour is far more useful because it means that links like:
>
> <a href="#" onclick="javascript:....">
>
> don't take you up to the top of the page when clicked.

That is, they do not work according to specifications.

I can see the pragmatic reasons for doing that, but it's really
disappointing that Opera takes the path of guessing what the author really
wants and trying to do that, even if that means violating published
specifications. I thought such behavior was a trademark or patented
invention of Microsoft, or something.

> If people want
> to go to the top of the page, they can just hit the "Home" key on
> their keyboard to get back to the top of the page.

Surely, but that's no excuse for a browser to refuse to follow the
specifications.

(I could play Devil's advocate and develop a defence for this feature,
saying that Opera _does_ process the URL "#" by the specs but it does not
position the current document at the start, since no such behavior is
_required_ - it's just the reasonable thing that browsers have done from the
early days. No specification says how a browser should really react when you
follow a link with href="#foo" or href="#", though such links have defined
logical meanings. Who says that when following a link referring to "foo",
the browser should in any way help the user by showing the element referred
to and not some random place in the document? :-) )

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация