[uf-discuss] Tutorial on AHAH (such a cool technology!)
Benjamin West
bewest at gmail.com
Mon Feb 12 17:00:31 PST 2007
Roger,
Neat stuff. I thought it was pretty good, but take some issue with the
following:
<a href="javascript:ahah('Waldorf-Astoria-Photo.html','Photo');">photo</a>
The best practice is to wire the event up, and to use a button when
the element is not truly a link.
Something more like:
<button onclick="ahah('Waldorf-Astoria-Photo.html','Photo');">photo</button>
or even better:
<button id="photo_changer" type="button" >photo</button>
<script type="text/javascript>
// must be done either after onload fires or after the element appears
in the DOM...
// find the element.
photoButton = document.getElementById('photo_changer');
// wire up the event.
photoButton.onclick = function () {
ahah('Waldorf-Astoria-Photo.html','Photo');
};
</script>
-Ben
On 2/10/07, Costello, Roger L. <costello at mitre.org> wrote:
> Hi Folks,
>
> I have created a tutorial on AHAH (Asynchronous HTML and HTTP)
>
> http://www.xfront.com/microformats/AHAH.html
>
> Comments welcome.
>
> /Roger
>
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
>
More information about the microformats-discuss
mailing list