[Seaside] Anchor appearance when script attached

Johan Brichau johan at inceptive.be
Wed Feb 18 08:33:40 UTC 2015


Hi Laura,

You need to include an href attribute with the anchor.
Seaside puts one when you add a callback and if you do not need that (like in your example), you can set the href yourself using the #url: message.

We typically set the href to ‘javascript:{}’

html anchor url:’javascript:{}’; onClick: aScript; onKeyDown:aScript

Also see this discussion: http://stackoverflow.com/questions/10510191/valid-to-use-a-anchor-tag-without-href-attribute/10510353#10510353 <http://stackoverflow.com/questions/10510191/valid-to-use-a-anchor-tag-without-href-attribute/10510353#10510353>

cheers,
Johan

> On 18 Feb 2015, at 04:58, Laura Risani <laura.risani at gmail.com> wrote:
> 
> Hi all,
> 
> I want to attach a jQuery script to an anchor element while keeping the regular anchor appearance (i mean that web browsers render it like any other anchor, being focusable), and to be triggered under the same conditions a callback would (clicked / pressing a key while having focus).
> 
> I can attach the script by sending 
> html anchor onClick: aScript; onKeyDown:aScript
> but then the printed anchor looks on the web browser like regular text and don't get foucs.
> 
> Best,
> Laura
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150218/38beb455/attachment.htm


More information about the seaside mailing list