[Seaside] [2.8] WAAnchorTag>>onClick:

Boris Popov boris at deepcovelabs.com
Sat Jul 7 15:58:07 UTC 2007

Fair enough, I do expect to find things and that's why I'm doing it. Whatever you decide to do I think its important to have href added automagically to anchors that are there for onclick alone so that anchor styling applied still. No?


(Sent from an iPhone... Not!)

----- Original Message -----
From: seaside-bounces at lists.squeakfoundation.org <seaside-bounces at lists.squeakfoundation.org>
To: Seaside - general discussion <seaside at lists.squeakfoundation.org>
Sent: Sat Jul 07 02:27:05 2007
Subject: Re: [Seaside] [2.8] WAAnchorTag>>onClick:

> This one took almost 20 minutes to track down. Previous version stuffed
> 'javascript:void(0)' into href-less anchors to make browsers respect it
> as an anchor and apply styles, whereas 2.8 is not doing it anymore. What
> was the reason for removal?

Note that Seaside 2.8 is still work in progress and that you just
discovered a place where refactorings are going on.

The initial reason for this change was WAPopupAnchorTag:

1. WAPopupAnchorTag produced invalid Javascript up to know.

2. The recent refactoring enables:
   - Search engines follow the link.
   - Anchors work even if Javascript is disabled.
   - Power user have a better control where the new window should be
opened (same window, new window, new tab).

3. Moreover the refactoring made WAPopupAnchorTag a real subtype of
WAAnchorTag, before it was just a hack that added some behavior of
WAAnchorTag but mostly destroyed functionality from its superclass.

4. Less code. Less magic.

This refactoring would not have been possible, if WAAnchorTag
automatically added javascript:void(0) to the on click event.

We are about to clean up WAAnchorTag (in a backward compatible way).
Some general ideas that drive these cleanups of the tag hierarchy are:

1. Dependencies in the order of configuration messages should be
avoided altogether (this was not the case with #onClick:). The only
thing people should need to know is that #with: has to be last.

2. Configuration messages should not have unpredictable side-effects
(again this was not the case with #onClick:).

3. URLs should be URL objects, not Strings. Only this allows to
properly encode the resulting response.


Lukas Renggli
Seaside mailing list
Seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070707/33ab505f/attachment.htm

More information about the Seaside mailing list