[Seaside] Use of onMouseOver: and onMouseOut: in Seaside 2.8x
obi068 at gmail.com
Fri Nov 7 08:37:02 UTC 2008
You could try something like this!
You will need an extra CSS class for your rows!
self session addLoadScript: (html selector
do: [ :each |
each element on: 'mouseover' do:
each element on: 'mouseout' do:
On Fri, Nov 7, 2008 at 7:55 AM, Richard E. Flower <rickf at ca-flower.com>wrote:
> On Nov 6, 2008, at 1:11 AM, Sebastian Sastre wrote:
>> Hi Richard,
>> code that runs in DOM unless a callback is envolved. Unfortunately there
>> is not
>> Firebug code halts yet to mimic our debugging style. I miss that when
>> You can use this to check in firebug's console if your code executes under
>> SUScript new
>> add: (SULogger new log: 'The mouse is over!');
>> Usage of onClick, onMouseOver, etc are considered the "vile way" to do it.
>> Instead prefer observe(). Details here:
> I don't suppose you've got an example using the above mentioned observe()
> code in Prototype
> do you? Is this what is used by Scriptaculous' SUElement? I saw a
> reference to 'observe'
> in there but wasn't sure.. I've just spent the last hour or so looking thru
> the old email
> archives for this list and saw some tidbits but no concrete examples.. I
> also looked at the test
> code for Scriptaculous but nothing similar to what I want to do, which is
> to change the css for
> an id when the mouse goes over the row in a table...
> I saw a reference in an email you wrote this past August talking about
> using :
>> From Seaside you access that with anElement>>on: anEventString do:
> With prototype you can even use your own custom events like this: anElement
> fire: 'mouse:enter'
> However, I'm not sure about the context in which to use the above.. An
> example would
> be great!
> Currently my row rendering code looks something like :
> renderRowNumber: index item: row on: html
> html tableRow id: 'row' , index asString;
> class: (self classForRowNumber: index);
> script: (self componentScriptOn: html);
> onClick: (html evaluator
> callback: [:aScript | self
> adjustRowColorsUsingIndex: index onScript: aScript];
> return: false);
> with: [columns
> do: [:ea | self
> renderColumn: ea
> row: row
> on: html]]
> componentScriptOn: html
> ^(Scriptaculous.SUScript new
> add: (Scriptaculous.SUEvent new
> observe: html scriptaculous document
> on: 'mouseover'
> do: (Scriptaculous.SULogger new log: 'The mouse is
> ); yourself;
> When I execute this with Firefox (and Firebug) I get the following error in
> the console window:
> Event.observe is not a function
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside