[uf-discuss] Tutorial on AHAH (such a cool technology!)
jcraig at apple.com
Tue Feb 13 16:12:57 PST 2007
Benjamin West wrote:
>> > >
>> > > The best practice is to wire the event up, and to use a button
>> > > the element is not truly a link.
>> How is this not a link?
>> You can link to a template that takes the data as a parameter:
>> <a href="hotels.php?h=waldorf" id="photo">photo</a>
> The difference, of course, is the first example doesn't have a URI.
> Your example does have a URI. If clicking on an anchor element won't
> ever take you to a new page (because there is no URI), don't use the
> anchor element!
I disagree. You should be practicing accessible, progressive
enhancement. The first example does have a URI, it's the relative
path to Waldorf-Astoria-Photo.html and should be set up to work from
a spider, script disabled browser, or even a "right-click to open
effectively hijacking the user's browser will do nothing except
ensure the content is inaccessible to all but a few targeted user
<a href="Waldorf-Astoria-Photo.html" class="ahah-photo">photo</a>
Works as a regular link and–once the right event handlers are
assigned–will work as a JS-enhanced interface.
More information about the microformats-discuss