2009/2/16 Daniel Rubin <dru...@dimedis.de>: > Richard Quadling wrote: >> Hi. >> >> I want to set an error message for 20 seconds ... >> >> $('sessionError').update(o_E.responseText).show().hide.delay(20); >> >> The message is displayed correctly. >> >> But not hidden again after 20 seconds or so. > It's because you lose the scope of the $('sessionError') Element when > you get the hide-method. You're back in the calling scope, which > doesn't seem to be an Element, so that's why there's no style-property. > This works: > $('sessionError').update(o_E.responseText).show() > .hide.bind($('sessionError')).delay(20); > But the chaining doesn't really make sense any more. > > I think it could best be solved like this: > $('sessionError').update(o_E.responseText).show(); > (function () { $('sessionError').hide (); }).delay (20: > > Have fun > ----Daniel > > > > -- > Daniel Rubin dru...@dimedis.de > dimedis GmbH www.dimedis.de > Dillenburger Strasse 83 0221/921260-44 (-59,Fax) > 51105 Koeln Software Entwicklung > HRB Köln 51787 Geschäftsführer: Dipl.-Ing. W. Halling > > > >
I'm getting it. Slowly. Very very slowly. Thank you. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ 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 prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---