exptrade2001-/E1597aS9LQAvxtiuMwx3w@public.gmane.org
2007-Jan-25 17:18 UTC
Effect.Fade/Appear and/or Draggable not working with two div
I have a page that has two div elements. Inside a div is an image that onhover opens as menu from which user can pick options. Once user pick option an ajax call via Anthem library is executed and another image within a div gets updated with generated chart. Now, anthem allows two functions to be callback, one happens just before callback (PreCallBackFunction) and another after callback (PostCallBackFunction). So in ''pre'' function I call Effect.Fade on the div and it works fine, and Effect.Appear at ''postcallback''. No problem so far. Problem occurs with a second div. Same module, same script but effects never happen. I can debug script, I can see effect being created, I can see corect div ID, but effect never happens. Effect happens only on whichever first module it is used on. Other modules do not respond to it. Same true with Draggable. First div can be dragged around, second one can be dragged around but it is attached to the cursor movement. I cannot get rid of it. Here is a script used. Now I am not javascript expert. I just try to get it working. Could somebody help me with this. var _divMain=''''; function savedQueryView_PreCallBack() { ctlPrefixID event.srcElement.id.substr(0,event.srcElement.id.lastIndexOf("SavedQueryView")) + "SavedQueryView"; _divMain = dnn.dom.getById(ctlPrefixID +"_divMain"); new Effect.Fade(_divMain, {from:1.0, to:0.1, duration:0.3}); } function savedQueryView_PostCallBack() { div = dnn.dom.getById(''dnn_ContentPane''); new Effect.Appear(_divMain, {from:0.1, to:1.0, duration:0.3}); } --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---