search for: childnod

Displaying 20 results from an estimated 60 matches for "childnod".

Did you mean: childno
2006 Feb 07
2
Question about Classes.
...}, createArray: function(response) { xmlDoc = response.responseXML; var ei = xmlDoc.getElementsByTagName(''event_info''); for(j=0;j<ei[0].childNodes.length;j++) { if (ei[0].childNodes[j].nodeType != 1) continue try { //this.sdEventInfo[ei[0].childNodes[j].nodeName] = ei[0].childNodes[j].firstChild.nodeValue; //this.options.sdEventInfo.push(ei[0].childNodes[j].firs...
2007 Oct 13
0
5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c test/trace
...4 100644 Binary files a/test/trace/xml-parse-6.swf and b/test/trace/xml-parse-6.swf differ diff --git a/test/trace/xml-parse-6.swf.trace b/test/trace/xml-parse-6.swf.trace index b450ce6..924e689 100644 --- a/test/trace/xml-parse-6.swf.trace +++ b/test/trace/xml-parse-6.swf.trace @@ -167,8 +167,8 @@ childNodes: 0: Loading: xml-parse-2.xml Success: true --- -788 -788 +820 +820 docTypeDecl: <!DOCTYPE foo [ <!ENTITY greeting "hello"> ]> ignoreWhite: true loaded: true @@ -301,7 +301,7 @@ nextSibling: undefined previousSibling: TAG(1): 'empty_element' childNodes: 0:...
2006 Mar 23
4
XML parser fixed
...ete(this.XMLParsed); } }, _nodeToHash: function (node) { Element.cleanWhitespace(node); // // remove comments, firefox fix node = this._removeComments(node); if ((node.attributes && node.attributes.length > 0) || (node.hasChildNodes() && (node.childNodes[0].nodeType == 1 || node.childNodes[0].nodeType == 7))) { var localHash = {}; if (node.attributes && node.attributes.length >= 1) { $A(node.attributes).each(function (attr) { localHash[attr.nodeN...
2008 May 19
6
obtaining table cell text data
...f particular columns. My event handler starts off like this: subsetChange: function(e) { var subset = $F(''subsetSelector''); var rows = $$(''.content-row''); rows.each(function(row) { var value = row.down(''.Platform_Category'').childNodes[0].data; switch (subset) { ... show/hide rows based on whether the value matches the user selected subset ... My question is whether there is a more Prototype-ish way to get the values from my table cells instead of using ".childNodes[0].data". Thanks in advance for any a...
2006 Mar 17
6
Updated the xml code to be more object-oriented
...oc; }, asHash: function () { if (! this._xmlHash) { this._xmlHash = this._nodeToHash(this.element); } return this._xmlHash; }, _nodeToHash: function (node) { Element.cleanWhitespace(node); if ((node.attributes && node.attributes.length > 0) || (node.hasChildNodes() && node.childNodes[0].nodeType == 1)) { var localHash = {}; if (node.attributes && node.attributes.length >= 1) { $A(node.attributes).each(function (attr) { localHash[attr.nodeName] = [attr.nodeValue]; }); } $A(node.childNodes).each(function (node)...
2005 Nov 07
2
question about Effect.Highlight and IE 5.5
...ix the problem. The problem is that IE 5.5 seems to ignore setting the style.backgroundColor on TR elements. If you apply it instead to all of its child TD elements, it will work correctly. So, in the Effect.Highlight.update and Effect.Highligh.finish functions you would need to loop through all childNodes if the element is a TR and apply the same color to each childNode, as such: update: function(position) { var effect = this; var colors = $R(0,2).map( function(i){ return Math.round(effect.colors_base[i]+(effect.colors_delta[i]*position)) }); this.updateElementColor(&quot...
2006 Mar 17
10
good javascript xml parser
Anyone know of a javascript function that will take an xml document and turn it into an associative array? Basically it would take something like this: <body> <item> <id>1</id> <name>Bob</name> </item> <item> <id>2</id> <name>John</name> </item> </body> And turn it into something like this: {
2006 Jan 24
8
scriptaculous sortable
Hi, maybe I am using this the wrong way but I have a list as follows <ul id="secondlist"> <li>bla bla</li> <li> bla bla </li> </ul> and then I add dynamically further <li> elements and create a Sortable but the onUpdate only fires for <li> items that have not been created via Javascript. Any clues? <script
2006 Jun 29
0
Sortables question
...ment:sections, only:''templateSelectItem'', onChange:function(drg){g_draggedElement = drg.id;}, onUpdate:function(drp) { var bDroppedHere = false; //console.log(drp.hasChildNodes()); for(var i=0;i<drp.childNodes.length;i++) if(drp.childNodes[i].id == g_draggedElement) bDroppedHere = true; if(bDroppedHere) { var...
2005 Sep 27
8
prototype.js
Hi *, We don''t know if you guys are the right audience, but we got a problem with prototype.js we need to solve. Essentially, it is a compatibility bug with the IE. We wrote a component so it updates itself periodically using AJAX. we used the prototype.js to accomplish this (using the periodicalUpdater object). now the component works fine using firefox or opera, but NOT with IE. the
2006 Mar 01
2
RE: manipulate <td>''s and their content bygrabbingtheir classNames
> Or... > > var myTDs = new Array(); > $A($("main").childNodes).each(function(tr) > { > $A(tr.childNodes).each(function(td) > { > myTDs.push(td); > }); > }); You''ll probably want to make sure the tr elements are TR tags and the same for the td''s, as empty text nodes are inserted randomly by the gecko engine (and mayb...
2007 Nov 02
0
2 commits - libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c
...9;\0'); } diff --git a/libswfdec/swfdec_xml_node.c b/libswfdec/swfdec_xml_node.c index 1acad6a..a528896 100644 --- a/libswfdec/swfdec_xml_node.c +++ b/libswfdec/swfdec_xml_node.c @@ -976,8 +976,10 @@ swfdec_xml_node_init_values (SwfdecXmlNode *node, int type, const char* value) node->childNodes = SWFDEC_AS_ARRAY (swfdec_as_array_new (object->context)); - if (node->children == NULL || node->attributes == NULL || node->childNodes) + if (node->children == NULL || node->attributes == NULL || + node->childNodes == NULL) { node->valid = FALSE; + } }...
2007 Dec 20
0
13 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c test/trace
...; encoding="UTF-8"?> +--- +attributes: 0: +localName: null +namespaceURI: null +nodeName: null +nodeType: 1 +nodeValue: null +prefix: null +parentNode: undefined +firstChild: TAG(1): 'html' +lastChild: TAG(1): 'html' +nextSibling: undefined +previousSibling: undefined +childNodes: 1: TAG(1): 'html' +--- +attributes: 1: xmlns=http%3A%2F%2Fwww%2Ew3%2Eorg%2F1999%2Fxhtml +localName: html +namespaceURI: http://www.w3.org/1999/xhtml +nodeName: html +nodeType: 1 +nodeValue: null +prefix: +parentNode: TAG(1): 'null' +firstChild: TAG(1): 'head' +lastChild:...
2006 May 30
0
problem with effect toggle - please help
...ElementsByTagName(''*'')).each( function(el) { try { Element.cleanWhitespace(el); } catch (e) {} }); this.bContainer = this.element; this.bContainerId = this.bContainer.getAttribute(''id''); this.bTitle = this.bContainer.childNodes[0]; this.bBtnToggle = this.bTitle.getElementsByTagName(''IMG'')[0]; this.bContentWrap = this.bContainer.childNodes[1]; this.bContent = this.bContentWrap.childNodes[0]; this.originalHeight = Element.getHeight(this.bContentWrap); this.boolUpdate = false;...
2006 Mar 03
6
[PATCH] Effect.Accordion (not from the wiki)
Hello boys and girls In the ever-loving spirit of OSS, here''s another feature for s.a.u. In particular it''s called Effect.Accordion, and is a scriptaculified version of openrico''s Accordion. Work in progress, I''ll submit further modifications as the come in, but this is 90% of what needs to be done. I anticipate some bugs when I start using it more. Tested
2005 Oct 04
2
sorting error "Error: item.id has no properties"
...D version) serialize: function(element) { element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); return $A(element.childNodes).collect( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.split("_")[1])); <---------error occurs here! }).join("&"); } Any ideas? Thanks, Jamie
2005 Oct 04
3
serialize()
...ks, Jamie serialize: function(element) { element = $(element); var sortableOptions = this.options(element); var options = Object.extend({ tag: sortableOptions.tag, only: sortableOptions.only, name: element.id }, arguments[1] || {}); return $A(element.childNodes).collect( function(item) { return (encodeURIComponent(options.name) + "[]=" + encodeURIComponent(item.id.split("_")[1])); }).join("&"); }
2008 Jan 19
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/image test/swfdec_test.c test/swfdec_test_image.c test/trace
...e_string (SWFDEC_AS_OBJECT (xml)->context, - g_string_free (string, FALSE)); + xml->xml_decl = swfdec_as_context_give_string ( + SWFDEC_AS_OBJECT (xml)->context, g_string_free (string, FALSE)); // in version 5 parsing xmlDecl or docType always adds undefined element to // the childNodes array @@ -424,7 +426,7 @@ swfdec_xml_parse_docTypeDecl (SwfdecXml *xml, SwfdecXmlNode *node, if (*end == '\0') { xml->status = XML_PARSE_STATUS_DOCTYPEDECL_NOT_TERMINATED; } else { - xml->docTypeDecl = swfdec_as_context_give_string ( + xml->doc_type_decl = swfdec...
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 Jan 23
6
Performance Issues with Autocompleter
...e snip> updateChoices: function(choices) { if(!this.changed && this.hasFocus) { this.update.innerHTML = choices; Element.cleanWhitespace(this.update); Element.cleanWhitespace(this.update.firstChild); if(this.update.firstChild && this.update.firstChild.childNodes) { this.entryCount = this.update.firstChild.childNodes.length; for (var i = 0; i < this.entryCount; i++) { var entry = this.getEntry(i); entry.autocompleteIndex = i; this.addObservers(entry); } } else { this.entryCou...