Hi guys,

I'm setting up a simple website acting as a furniture catalogue.
I have a div which should display details about an item chosen by the
user from another menu.
the effect i need to obtain is this:
1 - div is morphed to have height=0;
2 - div content is set via ajax;
3 - div is morphed back to have its normal height.

I used javascript timers to make sure that the first morph and the
ajax call are complete before morphing it back. this is the code:

 new Effect.Morph( "myDiv", { style:"height:0px;" } );
 load_page(page, "myDiv"); //this method implements the ajax call
 var t=setTimeout('new Effect.Morph( "myDiv", { style:"height:
222px;overflow:hidden;" } ); ',2000);

What happens is that if I do not wait 5-6 seconds before choosing
another item, the ajax call takes place EVEN before the first morph!
so when an user clicks the item, the div changes its content and then
gets 'squeezed' and back to normal.
How do I ensure that these three events take place in the correct
order (that is squeeze the div, change the content and then grow back
to its regular size)?

thanks in advance.
Best Regards,

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