[whatwg] href on any element

Kornel Lesinski kornel at osiolki.net
Tue Aug 29 11:11:56 PDT 2006


On Tue, 29 Aug 2006 17:02:22 +0100, Francisco Monteiro  
<monterro2004 at tiscali.co.uk> wrote:

> What practical use has this for Mr Joe Public?
>
> Give me a really useful example in very simple wording!

Having data table representing list of items where large clickable area is  
useful - i.e. inbox in a webmail, list of contacts, forum threads listing,  
etc.

I've ran into this problem many times and seen many questions about this  
on forums/usenet.

My current solution is:
<tr onclick="this.getElementsByTagName('a')[0].click()">

Another situation where I wanted href on any element was advertisement:

<div href="/buy">
<p>My product is:</p>
<ul>
<li>Cool</li>
<li>Great</li>
<li>And soo semantic</li>
</ul>
</div>

-- 
regards, Kornel Lesiński



More information about the whatwg mailing list