[Seaside] Use of onMouseOver: and onMouseOut: in Seaside 2.8x
Rick Flower
rickf at ca-flower.com
Fri Nov 7 23:43:46 UTC 2008
By the way, I modified the existing Seaside Unit Test (WATableReportTest)
to have a #renderContentOn: method as follows (the rest of the test code
is the same) :
WATableReportTest>>renderContentOn: html
self session addLoadScript: (html selector
add: 'tr.effect';
do: [ :each |
each element on: 'mouseover' do:
'$(event.target).up(''tr'').addClassName(''highlight'')'.
each element on: 'mouseout' do:
'$(event.target).up(''tr'').removeClassName(''highlight'')']).
html render: report.
Unfortunately, I must be doing something wrong as Firebug complains about
the use of '$$' below in the generated script... Any ideas what I've
missed?
<script type="text/javascript">
1/*<![CDATA[*/function
onLoad(){$$('tr.effect').each(function(){$(arguments[0]).observe('mouseover',function(event){'$(event.target).up(\'tr\').addClassName(\'highlight\')'});$(arguments[0]).observe('mouseout',function(event){'$(event.target).up(\'tr\').removeClassName(\'highlight\')'})})}/*]]>*/
</script>
More information about the seaside
mailing list