You've supplied two separate options objects to Efect.toggle, one
containing the duration and a separate one containing the callback.
Aren't they supposed to be in the same options object?

Separately:  Why use an old-fashioned DOM0 inline handler?  Instead:

<script type="text/javascript">
var mycallback = function() {
    alert("It works");
document.observe('dom:loaded', function() {
    $('intbarr_closed1').observe('click', function() {
                duration:    0.5,
                afterFinish: mycallback

É meglio, no?  That way you don't have code intermixed with your
markup.  (You don't have to use dom:loaded if you don't want to, you
can hook the window.load event instead.)

T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Apr 24, 10:20 am, aikon <aurelianodelva...@gmail.com> wrote:
> i just try to call aan action on afterFinish callback but it doesn't
> works ...
> this is my code .. :
> <script type="text/javascript">
> var mycallback = function() {
> alert('it works!');};
> </script>
> <div id="intbarr_closed1" class="intbarr_closed">
> <div class="intbarr_txt" id="bar1" onClick="Effect.toggle
> ('configurazioni1','blind',{duration: 0.5},
> {afterFinish:mycallback})">ATTIVAZIONE</div>
> </div>
> this should works .. but it doesn't ..
> any suggestion ?
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 
For more options, visit this group at 

Reply via email to