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++){
>>
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
>
whoops, sorry
function displayPreviewIcon(){
inputs = getInputsByAttribute('fldtype','filelocation');
for(i=0; i < inputs.length; i++){
//Testing
inputs[i].style.backgroundColor = '#ff00ff';
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
__
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
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
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:
>>
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.
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
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
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
11 matches
Mail list logo