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

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

Is 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