Displaying 20 results from an estimated 39 matches for "getelementsbyclassnam".
Did you mean:
getelementsbyclassname
2006 May 30
4
Limiting getElementsByClassName to specific nodes and entities
I''m currently using "The Ultimate getElementsByClassName"
(http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/)
instead of the Prototype version. This version seems to be faster since it
lets you specify the starting node and the type of entity. For example:
var widgets = getElementsByClassName(document, "ol&q...
2006 Jun 21
3
getElementsByClassName
How should I expect the performance of this function to be?
I wrote this code:
function CreateTOC(){
var $aTOC = document.getElementsByClassName(''tocitem'');
if(isArray($aTOC)){
$temp = ''<INPUT TYPE="SUBMIT" NAME="cmdSave_Update"
VALUE="Close" CLASS="menubuttons"> '';
$temp += ''<INPUT TYPE="SUBMIT" NAME="cmdSave_Update"
V...
2006 Nov 03
4
Bug? IE, getElementsByClassName and "length"
...efox. Safari seems fine. But IE...
Some detective work later, it seems that the problem is caused by
*another* field on the page. (With it, problems; without it, no
problems.) More detective work suggests that the problem is the field''s
name ("length").
More precisely, it seems getElementsByClassName in IE (6 and 7, at
least) will fail to gather elements (returns zero-length array) if
there is an input on the page with ''name="length"''.
Solutions: Change the name of the input, or use the optional parent
argument to avoid it.
More: Looking at the getElementsByClassN...
2006 Apr 17
2
RE: document.getElementsByClassName (prototype) andElement.childrenWithClassName (scriptaculous) redundancy?
...CW2h5@public.gmane.org
[mailto:rails-spinoffs-
> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jeremy Kitchen
> Sent: Monday, April 17, 2006 12:40 PM
> To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> Subject: Re: [Rails-spinoffs] document.getElementsByClassName
(prototype)
> andElement.childrenWithClassName (scriptaculous) redundancy?
>
> On Monday 17 April 2006 11:24, Jeremy Kitchen wrote:
> > Is there a reason scriptaculous provides what appears to be a
redundant
> > function? The reason I''m asking is that it only seems...
2006 Mar 15
4
sub-selection with $
Hello,
I have 2 navigations ( mainnav and subnav ) with 2 lists
List have same names ( li0 li1 li2 )
What is the best way to select li1 of subnav with prototype 1.4 in this
case ? I just want to hide/show it
Thanks
<div id="mainnav">
<ul>
<li name="li0"><li name="li1"><li name="li2">
</ul>
</div>
<div
2006 Mar 16
20
help with each
can you please tell me why this is not working? i got the example for how
to use each online and copied it to a t (except i added the if). its
telling me items.each does not exist.
var items = document.getElementsByClassName(''editView'');
if (items.length > 0){
items.each(function (result){
thisid = result.id;
thiskey = thisid.replace(/se_item_/gi, '''');
selist_toggleEdit(thiskey,''display'');
});
}
2006 Apr 17
1
document.getElementsByClassName (prototype) and Element.childrenWithClassName (scriptaculous) redundancy?
...king is that it only seems to be used twice
throughout all of scriptaculous, and it doesn''t appear to work properly (for
some reason it''s returning the actual element, rather than an array with all
of the elements)
If there is no reason, I''ll modify it to use document.getElementsByClassName
and submit a patch.
Thanks!
-Jeremy
--
Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org
In the beginning was The Word and The Word was Content-type: text/plain
-- The Word of Bob.
And the lord said unto John; Come forth and receive eternal life. John came
fi...
2008 Mar 21
3
getElementsByClassName
I know this is deprecated in 1.6, but my question is how do I properly
use the native browser implementation? Do I need to change my code?
I''m having a difficult time finding examples on this. Why is this
deprecated instead of incorporated into prototype? Or did I answer my
own question...
Also, I want to utilize the new document.querySelector. Has some one
implemented this inside
2007 Feb 17
4
childrenWithClassName
Hi,
i need some help :)
Does anywhere exists a fix for a code (scheme) like this:
----------------
var blas = document.getElementsByClassName( ''foo-class'', ''foo-id'' );
blas.each
(
function( bla )
{
var subbla = Element.childrenWithClassName( bla, ''subbla-class'',
true );
}
);
--------------
This scheme worked well till script.aculo v1.6.4
Since v1.6.5 I''ll receive this...
2007 May 28
7
$$ is slooooow in IE
While $$ and getElementsByClassName are ridiculously speedy in Firefox
(thanks to XPath), I''m finding both functions to be intolerably slow
in IE. The page I''m working with has fewer than 1000 elements --
doesn''t seem THAT big -- and it''s still taking upwards of 4 seconds
(!) to pick out the righ...
2006 Feb 23
25
reloading fragments of pages
Hello,
I have a treeview, that works with scriptaculous in order to load the nodes
dynamically.
I also have in the main part of the page, a table with the list of elements.
The lists of elements can be drag-dropped on the treeview in order to move
them around
(they are also draggable on other parts of the page)
I need though, to refresh the treeview to reflect changes when a folder was
moved
2005 Dec 17
17
problems with quotes and escaping
First of all I''d like to say thanks for all the great work everyone has put
into scriptaculous,
I''m having a lot of fun playing with the framework, and easily moving into
Web 2.0 territory.
I''ve just hit a snag on my project though.
So here''s my code:
...
var newEvent=
"<div
2006 Feb 09
6
inPlaceEditor ISSUES!
I have run into a problem that I have never created before. I am
using the scriptaculous inPlaceEditor
If I hit the cancel button, and rehit the editor it then creates two
textboxes, and if I repeat three input boxes, etc.!
Must be stupid simple, but I AM STUMPED!
DECO
2006 Jun 20
4
Prototype Array bug??
function CreateTOC(){
var $aTOC = document.getElementsByClassName(''tocitem'');
var $temp = '''';
if(isArray($aTOC)){
for($t in $aTOC){
$temp += ''t='' + $t + '', '' + $aTOC[$t].name +
''<BR>'';
}
$(''test1'').innerHTML = $temp;...
2006 Jun 02
2
Group checkbox toggling
This isn''t really a scriptaculous question, but it might be interesting
anyway.
I''m generating a rails app and in one form I have a grid of check-boxes
(rows = A..H and col=1..12).
I would like to put a checkbox in the column/row headers to toggle the
boxes in a particular row or column. Each box has a name like
''position_A1'' or
2006 Apr 07
4
Effect.toggle error in 1.6.1
I have this line of code:
new Effect.toggle(document.getElementsByClassName(''modarea'',
Event.findElement(ev,''li'')), ''blind'');
I''ve confirmed that the Effect.toggle is indeed getting the proper element,
however, I''m getting this in my javascript console:
element.visible is not a function (effects.js...
2006 Jan 31
5
resizing multiple images using getElementsByClassName
...ground-
image: url(slidder2.png)"></div>
</div>
var scalebar = new Control.Slider(''scaller'', ''track'',{
sliderValue:1,
minimum:.25,
onSlide:function(v){doscale(v)},
onChange:function(v){doscale(v)}
});
2) I am using getElementsByClassName to get all the images to scale,
and then running a "for" loop and then resizing each image''s
containing div
even with only 25 images in there now, it is a little choppy. There
must be a better/more efficient way to scale all elements of a given
class...
Oh ya, I have o...
2006 Nov 13
8
Problems with Prototype in script.aculo.us 1.6.5
Hi,
When I''m using the Prototype version attached to script.aculo.us 1.6.5
(Prototype 1.5.0_rc1 revision [5462]) I get some "Object doesn''t
support this property or method" in the Effect.BlindDown method (when
the method tries to get the dimentions). If I''m using the version of
prototype that was attached to 1.6.4 I do not get this error.
Is this a known
2006 Jun 14
0
weird toggle behavior on IE
Hi,
Just found out this weird bug in IE (or I probably should say IE bug that
needs workaround?)
This works in IE, FF
document.getElementsByClassName(''box'').each (
function(e) {new Effect.toggle(e, ''blind''); }
);
But this doesn''t work in IE
document.getElementsByClassName(''box'').each (
function(e) {new Effect.toggle(e, ''slide''); }
);
IE complains Object doesn...
2006 Feb 26
1
IE Problem with document.getElementsByTag
Does anyone know if IE has a limit to how many object
document.getElementsByTag can return? The main problem is that
getElementsByClassName is not working on my page with IE but it works with
Firefox. I''ve traced it back to the document.body.getElementsByTag(''*'')
command. While inspecting the length Firefox returns 465. In IE the length
alert returns [object]. When I changed document.body to a specific
conta...