[Proto-Scripty] Re: getElementsByClassName
Hi, I now use $A($$('img.IcErrorImage')).invoke('hide'); instead of $A(document.getElementsByClassName('IcErrorImage')).invoke('hide'); Works fine. There's no need for the $A part of that, $$ returns an array already. Do I have to use the element type after $$( ? As the docs say, it finds elements according to CSS selectors. Specifically, $$ supports CSS2 and a fair bit of CSS3, so you type the same selectors you'd use for CSS. So for instance: var inputControls = $$('.FokusControls'); Prototype's documentation is a bit messed up right now, but it may be useful to have a read through the old docs[1] and the new ones[2] (the old docs still have information that hasn't been migrated to the new docs yet; people are working on it). [1] http://prototypejs.org/api [2] http://api.prototypejs.org HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Mar 30, 4:47 pm, StephanSchipal stephan.schi...@s-itsolutions.at wrote: Dear T.J., thanks for your hint. I now use $A($$('img.IcErrorImage')).invoke('hide'); instead of $A(document.getElementsByClassName('IcErrorImage')).invoke('hide'); Works fine. But I have an other question, concerning this topic: I used: var inputControls = $A(document.getElementsByClassName('FokusControls')); There I got all input controls (like input, select, checkbox, button ...). (use: setting the focus programmatically to the next higher tabindex). Do I have to use the element type after $$( ? Or is there a generic syntax for all types? thanks in advance Stephan Vienna, Austria On Mar 23, 10:02 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, It was deprecated a couple of years ago, as of 1.6.0:http://www.prototypejs.org/api/element/getElementsByClassName ...and finally removed in 1.6.1. Best to switch over to something else, like `$$`. However, to ease transition, there is deprecated.js:http://github.com/sstephenson/prototype/blob/master/src/deprecated.js HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Mar 22, 3:40 pm, StephanSchipal stephan.schi...@s-itsolutions.at wrote: Hi, with Version 1.6.1 my statement $A(document.getElementsByClassName('IcErrorImage')).invoke('hide'); does not work any more. Any help? thanks in advance Stephan Vienna, Austria- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: getElementsByClassName
Dear T.J., thanks for your hint. I now use $A($$('img.IcErrorImage')).invoke('hide'); instead of $A(document.getElementsByClassName('IcErrorImage')).invoke('hide'); Works fine. But I have an other question, concerning this topic: I used: var inputControls = $A(document.getElementsByClassName('FokusControls')); There I got all input controls (like input, select, checkbox, button ...). (use: setting the focus programmatically to the next higher tabindex). Do I have to use the element type after $$( ? Or is there a generic syntax for all types? thanks in advance Stephan Vienna, Austria On Mar 23, 10:02 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, It was deprecated a couple of years ago, as of 1.6.0:http://www.prototypejs.org/api/element/getElementsByClassName ...and finally removed in 1.6.1. Best to switch over to something else, like `$$`. However, to ease transition, there is deprecated.js:http://github.com/sstephenson/prototype/blob/master/src/deprecated.js HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Mar 22, 3:40 pm, StephanSchipal stephan.schi...@s-itsolutions.at wrote: Hi, with Version 1.6.1 my statement $A(document.getElementsByClassName('IcErrorImage')).invoke('hide'); does not work any more. Any help? thanks in advance Stephan Vienna, Austria- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: getElementsByClassName
Hi, what is FokusControls? is it a defined class name? If you want to use it with $$ syntax, you could go with $$('.FokusControls'). Actually $$() support all CSS2 selectors. You should be able to get CSS2 selector reference at http://www.w3.org/TR/CSS2/selector.html On Wed, Mar 31, 2010 at 2:47 AM, StephanSchipal stephan.schi...@s-itsolutions.at wrote: Dear T.J., thanks for your hint. I now use $A($$('img.IcErrorImage')).invoke('hide'); instead of $A(document.getElementsByClassName('IcErrorImage')).invoke('hide'); Works fine. But I have an other question, concerning this topic: I used: var inputControls = $A(document.getElementsByClassName('FokusControls')); There I got all input controls (like input, select, checkbox, button ...). (use: setting the focus programmatically to the next higher tabindex). Do I have to use the element type after $$( ? Or is there a generic syntax for all types? thanks in advance Stephan Vienna, Austria On Mar 23, 10:02 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, It was deprecated a couple of years ago, as of 1.6.0: http://www.prototypejs.org/api/element/getElementsByClassName ...and finally removed in 1.6.1. Best to switch over to something else, like `$$`. However, to ease transition, there is deprecated.js: http://github.com/sstephenson/prototype/blob/master/src/deprecated.js HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Mar 22, 3:40 pm, StephanSchipal stephan.schi...@s-itsolutions.at wrote: Hi, with Version 1.6.1 my statement $A(document.getElementsByClassName('IcErrorImage')).invoke('hide'); does not work any more. Any help? thanks in advance Stephan Vienna, Austria- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: getElementsByClassName
Hi, It was deprecated a couple of years ago, as of 1.6.0: http://www.prototypejs.org/api/element/getElementsByClassName ...and finally removed in 1.6.1. Best to switch over to something else, like `$$`. However, to ease transition, there is deprecated.js: http://github.com/sstephenson/prototype/blob/master/src/deprecated.js HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Mar 22, 3:40 pm, StephanSchipal stephan.schi...@s-itsolutions.at wrote: Hi, with Version 1.6.1 my statement $A(document.getElementsByClassName('IcErrorImage')).invoke('hide'); does not work any more. Any help? thanks in advance Stephan Vienna, Austria -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.