You got it, this is exactly how I managed it
Christophe
Le 19 mars 2010 à 17:23, bernard wolsieffer a écrit :

> Woohoo! Works pretty well, although, i'm not sure that I did it completely 
> correctly. I had to put the Effect.Appear inside the afterFinish for the 
> Effect.Fade... otherwise, nothing showed up.
> Now all I have to do is generalize the buttons to use this... merci boucoups.
> bernard
> 
> On 3/19/2010 9:20 AM, Christophe Decaux wrote:
>> 
>> I haven't look thoroughly at your issue, but seems to me that you have to 
>> queue those two effects. Otherwise, they try to happen together.
>> I ran a while ago into the same issue.
>> When you lauch an effect, javascript doesn't wait for it. Remaining code is 
>> executed immediately.
>> So either you look at Effects.Queue in Scriptaculous doc, or you investigate 
>> the afterFinish option that you could add to the first effect
>> 
>> Christophe
>> 
>> Le 19 mars 2010 à 15:44, bernard wolsieffer a écrit :
>> 
>>> Update:
>>> I changed things up a bit:
>>> <body onload="loadPage('index.html');" id='home' style="display:inline; ">
>>>         <div id="root" width="100%" height="100%" style="display:inline; ">
>>>                 <div id="container" width="100%" height="100%" 
>>> style="display:inline; ">
>>>                 </div>
>>>         </div>
>>> </body>
>>> Note that I removed the <iframe> from the page definition. Now, the changes 
>>> in code:
>>> function loadPage(s) {
>>>         Effect.Fade('root', {duration:1.5});
>>>         if ($('contentFrame')) {
>>>                 $('contentFrame').remove();
>>>         }
>>>         Element.insert('container', {top: "<iframe id='contentFrame' src='" 
>>> + s + "' frameborder='0' scrolling='no' width='100%' height='100%' 
>>> style='display:inline; '></iframe>"});
>>>         Effect.Appear('root', {duration:1.5});
>>> }
>>> Result? The element upon which I apply Fade/Appear has either
>>> style="display:none;"
>>> or
>>> style="" (which seems to force 'display:none')
>>> and it doesn't matter if it's the body element or the root <div>. The 
>>> effect still is:
>>> page appears (without the 1.5 duration).
>>> page disappears (without any duration).
>>> Note that I'm using Google Chrome - its debugging facility is actually 
>>> pretty nice. The behaviour is the same in Firefox.
>>> 
>>> Thanks in advance for any hints that might help.
>>> 
>>> bernard
>>> 
>>> -- 
>>> 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.
>> 
>> -- 
>> 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.
> 
> 
> -- 
> Le homme n'est rien; le oeuvre c'est tout
> Flaubert
> 
> -- 
> 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.

-- 
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.

Reply via email to