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 <[email protected]>
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" <[email protected]> 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 <[email protected]>
> > 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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.