[Seaside] Re: Anchor appearance when script attached

David Carlos Manuelda stormbyte at gmail.com
Wed Feb 18 17:28:57 UTC 2015


jtuchel at objektfabrik.de wrote:

> Wow, so I learned something again ;-)
> 
> Am 18.02.15 um 09:33 schrieb Johan Brichau:
>> 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
>>
>> cheers,
>> Johan
>>
>>> On 18 Feb 2015, at 04:58, Laura Risani <laura.risani at gmail.com
>>> <mailto: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
>>> <mailto:seaside at lists.squeakfoundation.org>
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 
> 
I also noticed that behavior when a callback *or* a href message is not 
given to the anchor, so either set a href as being suggested to, or set a 
callback.



More information about the seaside mailing list