On 2/13/07, Ara Pehlivanian <[EMAIL PROTECTED]> wrote:
On 2/12/07, Benjamin West <[EMAIL PROTECTED]> wrote: > 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.
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> Then you can use event handling to assign the ahah() function to the link and hijack the standard behaviour. You could even re-use the script, add another parameter and get the data back from the same template in two formats. This example does that (except for the templating part): http://beginningjavascript.com/Chapter8/exampleXHR.html This one even does the templating: http://beginningjavascript.com/Chapter10/examplePHPXHRgallery.php This will also make search engines index the detail page. Don't make things more complicated than they are. Modern scripting allows you to easily enhance real semantic HTML without having to rely on markup that only makes sense when scripting is enabled. cheers Chris -- Chris Heilmann Book: http://www.beginningjavascript.com Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ _______________________________________________ microformats-discuss mailing list microformats-discuss@microformats.org http://microformats.org/mailman/listinfo/microformats-discuss