Displaying 20 results from an estimated 2000 matches similar to: "getElementsByClassName"
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;
}
}
When I run this code
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 right ones.
Are there documented problems with particular
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 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", "tree");
Is
2006 Nov 03
4
Bug? IE, getElementsByClassName and "length"
So, I have this form/datagrid thing. I want to have a button that
clears the fields (not a reset, which would set them to the default
state, I want them blank.) For various reasons, getByClassName seemed
the best way to deal with this.
Everything was fine on Moz/Firefox. Safari seems fine. But IE...
Some detective work later, it seems that the problem is caused by
*another* field on the page.
2005 Sep 25
2
Preventing/allowing exceptions to occur in Element.add/remove ClassName
Hello everyone !
Thomas asked me to discuss here the behavior of Element.addClassName, as
relating to ticker #2232 [1]. In HEAD, if the element passed-in to
Element.addClassName does not exist, an exception is thrown, and script
execution stops there.
I believe this is inconsistent with other functions:
Object.extend(Element, {
hasClassName: function(element, className) {
element =
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
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
2006 Apr 17
2
RE: document.getElementsByClassName (prototype) andElement.childrenWithClassName (scriptaculous) redundancy?
Isn''t the difference that the scriptaculous one only gets child nodes
from the node you specify, whereas the prototype one gets all in the
entire document?
Still, it would be nice to just have the one, and let you pass in the
document element if you wanted all of them.
Just guessing, really. I haven''t looked at the code in question.
Greg
> -----Original Message-----
>
2006 Jan 31
5
resizing multiple images using getElementsByClassName
I am building a iPhoto like (Read rip-off) interface for thumbnails
and I am having a couple problems that I thought some one on the list
might be able to assist me on ...
first off here is the page: http://v4.incontrolsolutions.com/galltest/
I am no Javascript whizz and I am sure there is a FAR more efficient
way to do what I am trying. Having said that, the 2 things I was
looking for
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
2006 Feb 10
13
Element.observe () binding
Hey all,
I working on a project, but I am not sure I can do what I want to
do. The following works beautifully:
Event.observe(el, ''click'', function () { this.className += "
myClass"; return false; });
I have also tried doing this:
this.varname = ''test'';
Event.observe(el, ''click'', function () { alert (this.varname); }.bind
2006 Feb 24
8
possible Slide and Blind IE bug
Hi,
I''m new to this list, new to script.aculo.us but pretty comfortable with
javascript. I''m trying to get a combination of Effect.SlideUp and Down
and Effect.BlindUp and Down to well... it''s hard to describe, maybe have
a visit here (try in firefox first):
http://bruno.biosci.arizona.edu/occa/test.html
Click on "next month" a couple times, then click on
2006 Apr 17
1
document.getElementsByClassName (prototype) and Element.childrenWithClassName (scriptaculous) redundancy?
Is there a reason scriptaculous provides what appears to be a redundant
function? The reason I''m asking 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
2006 Mar 22
9
Setting empty fields with in_place_editor_field
Hi all!
Playing around with in_place_editor_field, I found that when you set a
field to be empty, you can''t edit it at all anymore after that. Am I
doing something wrong or is this the way it is intended to be? If so, is
there any way around that behaviour? Is it just styling?
Best regards,
Raphael
--
Posted via http://www.ruby-forum.com/.
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, '''');
2008 Jan 24
10
sorting divs by class
I have a script that pulls in a bunch of data to my page and parses it
out into the following format:
<div id="container">
<div id="myID1" class="new">stuff</div>
<div id="myID2" class="new">stuff</div>
<div id="myID3" class="read">stuff</div>
<div id="myID4"
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
2007 Aug 22
2
gWidgets (tcltk): problem extracting values from widgets in glayout grid
Hello,
I haven't been able to find an example for the second case below -- or
perhaps I didn't recognize it when I saw it.
Is there a value for x such that svalue(x) will return "bbb", either by
itself or as part of an array? Or do I need to do something else
entirely?
(R2.5.1; Windows XP)
> #### gWidgets test
> options("guiToolkit"="tcltk")
>
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: line 153)
I