I have a div for my indicator, but it isn''t working. Please help!!! Here is the javascript: new Ajax.Autocompleter("DCO_Number", "autosuggest", "DCO_Manage_Project.cfc?method=getHTML", {afterUpdateElement:getInfo,indicator:''JSMX_loading'',frequency:0.1}); Here is the CSS for the div (below). div#JSMX_loading{ position:static; top:0px; left:0px; margin:0px; padding:0px; width:112px; height:30px; display:none; background-color:#FF0000; background-image:url(../_images/processing.gif); background-repeat: no-repeat; z-index:200; } although, I override some of the styles as such: style="position:absolute; left:743px; top:167px;" --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve aka TDD
2006-Sep-29 14:52 UTC
Re: Can''t get Scriptaculous indicator to work!
Hey there, mobrien118 a écrit :> new Ajax.Autocompleter("DCO_Number", "autosuggest", > "DCO_Manage_Project.cfc?method=getHTML", > {afterUpdateElement:getInfo,indicator:''JSMX_loading'',frequency:0.1});First, you might want to be more consistent with this API, and provide the "method=getHTML" part as the ''parameters'' key in the options hash: new Ajax.Autocompleter(''DCO_Number'', ''autosuggest'', ''DCO_Manage_Project.cfc'', { parameters: method=getHTML'', afterUpdateElement: getInfo, indicator: ''JSMX_loading'', frequency: 0.1 }); Second, and herein lies your problem:> div#JSMX_loading{...> display:none;...> }Prototype mandates that items to be toggled *never* use display: none in a stylesheet. It should appear in an inline style attribute for the element, for reasons related to the behavior of the CSS cascade, in order to be browser-portable. Therefore, try to remove this property from your stylesheet, and create an inline style attribute on the DIV with this single property (yes, this is a minor infraction to the content/appearance separation principle). This should work. ''HTH -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks Christophe! That works great for the indicator! About the parameters, I didn''t see that attribute documented, and I also wasn''t sure it would work with CF (i''m using a remote .cfc file to handle this), but I just tried it and it works like a charm! You are amazing! Fast response! Thanks so much! --mobrien118 p.s. I am going to start a thread about another problem I am having in a couple minutes, maybe you can help with that, if you have a sec --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
mobrien118, Just as an aside, you might find one of my plugins useful for helping with displaying indicators during remote calls... http://www.agilewebdevelopment.com/plugins/remote_helpers Hope it helps if you check it out. Andrew On 9/29/06, mobrien118 <mobrien118-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Thanks Christophe! That works great for the indicator! > > About the parameters, I didn''t see that attribute documented, and I > also wasn''t sure it would work with CF (i''m using a remote .cfc file to > handle this), but I just tried it and it works like a charm! > > You are amazing! Fast response! > > Thanks so much! > > --mobrien118 > > p.s. I am going to start a thread about another problem I am having in > a couple minutes, maybe you can help with that, if you have a sec > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---