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 [email protected]
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
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
begin:vcard
fn:Daniel Rubin
n:Rubin;Daniel
org:dimedis GmbH;Software Entwicklung
adr;quoted-printable:;;Dillenburger Strasse 83;K=C3=B6ln;;51105;Deutschland
email;internet:[email protected]
tel;work:0221 / 921260-44
tel;fax:0221 / 921260-59
x-mozilla-html:FALSE
url:http://www.dimedis.de/
version:2.1
end:vcard