Ok I ripped out the setTimeout but I still have on idea how I and
where I use this flag variable :

function updateDiv(page) {
        if(!Cookie.get('flag')) {
                Cookie.set('flag', 'flag', 1);
                new Effect.Fade('begin');
                new Effect.BlindUp('begin', {afterFinish:function() {
                        new Ajax.Updater('begin', '/pages/'+page, 
{onComplete:function(){
                                new Effect.Appear('begin');
                                new Effect.BlindDown('begin', 
{afterFinish:function() {
                                        Cookie.erase('flag');
                                }});
                        }, asynchronous:true, evalScripts:true});
                }});
        }
}

On 19 mrt, 13:16, Colin Mollenhour <[EMAIL PROTECTED]> wrote:
> Why use a cookie? It looks like the same thing could be accomplished with a 
> simple JS variable.. Also, get rid of the setTimeout calls or at worst have 
> setTimeout call a real function rather than passing it a string (which is 
> eval'd, which is a no-no).
> Effects have an afterFinish option which might be useful in this case...
> Colin
> Clifford James wrote:Well guys, I fixed it for now with some ugly code, have 
> a look at this: function updateDiv(page) { if(!Cookie.get('flag')) { 
> Cookie.set('flag', 'flag', 1); new Effect.BlindUp('begin'); new 
> Effect.Fade('begin'); setTimeout("new Ajax.Updater('begin', 
> '/pages/"+page+"', {onComplete:function(){new Effect.BlindDown('begin'); new 
> Effect.Appear('begin');}, asynchronous:true, evalScripts:true});", 1500); 
> setTimeout("Cookie.erase('flag')",1501); } } On 16 mrt, 10:55, "Clifford 
> James"<[EMAIL PROTECTED]>wrote:Hiya there! I'm using This combo for reloading 
> the page content; -Effect.BlindUp -Effect.Fade -Ajax.Updater 
> -Effect.BlindDown -Effect.Appear All of this is handled as one function 
> updateContent(); Now I use this function in a link 
> (onclick="updateContent('hereTheNewPage');"). Now when I double click on a 
> link with that function the BlindDown / BlindUp crashes. Its hard to explain 
> but take a look at this demo site :http://cliffordjames.wobutidau.comIs there 
> a way to fix this? Thanks, Clifford James


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to