Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
duh, ok. sorry and thanks for the help! > On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: >> whoops, sorry >> >> >> function displayPreviewIcon(){ >> inputs = getInputsByAttribute('fldtype','filelocation'); >> for(i=0; i < inputs.length; i++){ >>

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Todd Ross
On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: > whoops, sorry > > > function displayPreviewIcon(){ > inputs = getInputsByAttribute('fldtype','filelocation'); > for(i=0; i < inputs.length; i++){ > //Testing >

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
whoops, sorry function displayPreviewIcon(){ inputs = getInputsByAttribute('fldtype','filelocation'); for(i=0; i < inputs.length; i++){ //Testing inputs[i].style.backgroundColor = '#ff00ff';

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Todd Ross
On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: > the file is being included, it is in the top of my common.js > > i am getting the error before it does anything. could it be that my > common.js is not written in the OO style of js? > > here is the code; And ... how are you calling it? Todd __

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
the file is being included, it is in the top of my common.js i am getting the error before it does anything. could it be that my common.js is not written in the OO style of js? here is the code; document.getInputsByAttribute = function(attrib,val){ //Add-on to Prototype var child

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Todd Ross
On 2/23/06, Louis Walch <[EMAIL PROTECTED]> wrote: > i made a function which was a near duplicate of getElementsByClassName and > saved it as getInputsByAttribute and saved it in an external js file. > > but now i am getting "getInputsByAttribute can not be found" is there > something i need to do

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
i made a function which was a near duplicate of getElementsByClassName and saved it as getInputsByAttribute and saved it in an external js file. but now i am getting "getInputsByAttribute can not be found" is there something i need to do to make it part of prototype? > > > Louis Walch wrote: >>

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Cam McVey
Louis, In this senario, I usually add a class to the set of elements I'm interested in getting back to later on by doing a Element.addClassName() and then doing a getElementsByClassName() later on. You can remove the 'dummy' class later if you need to: Element.removeClassName() Hope this helps.

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
thanks rob, i will give input_.+ a shot. i use a custom attrib named fldtype for some input items and am hoping to assign different actions to each input based on that. > > > Louis Walch wrote: >> i would like to detect classnames of input_(ANYTHING) is this possible >> with getElementsByClass

Re: [Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Robin Haswell
Louis Walch wrote: > i would like to detect classnames of input_(ANYTHING) is this possible > with getElementsByClassName? Looking at the source code you could do getELementsByClassName("input_.+");, although it's undocumented behaviour so it might mysteriously break after a prototype upgrade on

[Rails-spinoffs] question about getElementsByClassName

2006-02-23 Thread Louis Walch
i would like to detect classnames of input_(ANYTHING) is this possible with getElementsByClassName? also, is tthere a way to get elements by attribute? or would that be too heavy on the load time? ___ Rails-spinoffs mailing list Rails-spinoffs@lists.ruby