Hi,
> This works by the way:
That's exactly how you do it.
> I'm confused, since this is similar, minus the bindAsEventListener.
The difference is in when the `$('SCORES').down('div.grid table'));`
part happens. In your earlier code:
document.observe(
'MeetQuery:lookup_scores',
_msoRSess.appear.bindAsEventListener(
_msoRSess,
$('SCORES').down.bind('div.grid table')
)
);
...the div.grid lookup happens right then, and then the result of it
is passed into `bindAsEventListener`. Since the result will be
undefined (because the div doesn't exist yet), that's all that
`bindAsEventListener` will see.
Your updated code:
document.observe(
'MeetQuery:lookup_scores',
function(event) {
_msoRSess.appear($('SCORES').down('div.grid table'));
}
);
...doesn't do the lookup until the event happens, which is what you
want. So the new code is correct.
HTH,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com
On Dec 27, 1:58 am, kstubs <[email protected]> wrote:
> This works by the way:
> document.observe('MeetQuery:lookup_scores', function(event) {
> _msoRSess.appear($('SCORES').down('div.grid table')); });
>
> I'm confused, since this is similar, minus the bindAsEventListener.
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.