I don''t know what''s going on here, I am getting a js error: element.down() has no properties when trying to use Effect.SlideDown(). I am using script.aculo.us version 1.8.1. HTML <div>( <a href="javascript:show_hide($(''forgot_password''));">Forgot Password?</a> )</div> <div id="forgot_password" style="display: none;">** Username / Password Reset Here **</div> JavaScript function show_hide(element) { if(element.style.display == "none") { new Effect.SlideDown(element, { duration: 1, sync: true }); } else { new Effect.SlideUp(element, { duration: 1, sync: true }); } } Thanks for the help. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Try without `new` http://github.com/madrobby/scriptaculous/wikis/effect-slidedown - kangax On May 11, 1:16 am, JustinK101 <justink...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I don''t know what''s going on here, I am getting a js error: > element.down() has no properties when trying to use > Effect.SlideDown(). I am using script.aculo.us version 1.8.1. > > HTML > > <div>( <a href="javascript:show_hide($(''forgot_password''));">Forgot > Password?</a> )</div> > <div id="forgot_password" style="display: none;">** Username / > Password Reset Here **</div> > > JavaScript > > function show_hide(element) { > if(element.style.display == "none") { > new Effect.SlideDown(element, { duration: 1, sync: true }); > } > else { > new Effect.SlideUp(element, { duration: 1, sync: true }); > } > > } > > Thanks for the help.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Nope, same error without ''new''. Any other ideas? Thanks. On May 10, 11:28 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try without `new`http://github.com/madrobby/scriptaculous/wikis/effect-slidedown > > - kangax > > On May 11, 1:16 am, JustinK101 <justink...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I don''t know what''s going on here, I am getting a js error: > > element.down() has no properties when trying to use > > Effect.SlideDown(). I am using script.aculo.us version 1.8.1. > > > HTML > > > <div>( <a href="javascript:show_hide($(''forgot_password''));">Forgot > > Password?</a> )</div> > > <div id="forgot_password" style="display: none;">** Username / > > Password Reset Here **</div> > > > JavaScript > > > function show_hide(element) { > > if(element.style.display == "none") { > > new Effect.SlideDown(element, { duration: 1, sync: true }); > > } > > else { > > new Effect.SlideUp(element, { duration: 1, sync: true }); > > } > > > } > > > Thanks for the help.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thomas Fuchs
2008-May-12 06:59 UTC
Re: Effect.SlideDown() element.down() has no properties
Hey, RTFM -- 2 Things: a) you need to add a wrapper div inside your forgot_password div (see Notes on http://github.com/madrobby/scriptaculous/wikis/effect-slidedown) b) You want queue: ''end'' instead of sync: true. The sync option is only for use with Effect.Parallel, as detailed on http://github.com/madrobby/scriptaculous/wikis/core-effects Best, Thomas On 12.05.2008, at 00:12, JustinK101 wrote:> > Nope, same error without ''new''. Any other ideas? Thanks. > > On May 10, 11:28 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Try without `new`http://github.com/madrobby/scriptaculous/wikis/effect-slidedown >> >> - kangax >> >> On May 11, 1:16 am, JustinK101 <justink...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> I don''t know what''s going on here, I am getting a js error: >>> element.down() has no properties when trying to use >>> Effect.SlideDown(). I am using script.aculo.us version 1.8.1. >> >>> HTML >> >>> <div>( <a href="javascript:show_hide($(''forgot_password''));">Forgot >>> Password?</a> )</div> >>> <div id="forgot_password" style="display: none;">** Username / >>> Password Reset Here **</div> >> >>> JavaScript >> >>> function show_hide(element) { >>> if(element.style.display == "none") { >>> new Effect.SlideDown(element, { duration: 1, sync: >>> true }); >>> } >>> else { >>> new Effect.SlideUp(element, { duration: 1, sync: >>> true }); >>> } >> >>> } >> >>> Thanks for the help. > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Christophe Porteneuve
2008-May-12 09:58 UTC
Re: Effect.SlideDown() element.down() has no properties
Why the hell do you use "sync: true" in the effect, as it apparently is not used anywhere within a Effect.Parallel? This option will replace the effect''s internal proceeding engine with a reliance on an external Effect.Parallel processing. Try without it (and yes, without "new" as well: SlideDown is not a constructor). -- 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?hl=en -~----------~----~----~----~------~----~------~--~---