I wrote the following function:

 

function getAllByNodeAttribute(attribute, value) {

      var elements = [];

      MochiKit.Base.nodeWalk(MochiKit.DOM._document, function (elem) {

            if(getNodeAttribute(elem, attribute) != null && getNodeAttribute(elem, attribute).toUpperCase() == value.toUpperCase()) {

                  elements.push(elem);

            }

            return elem.childNodes;

      });

      return elements;

}

 

I then have the following in my HTML:

 

<mkw:IntegerTextbox id="foo1" cssStyle="font-size:16px;" minValue="0" maxValue="500" />

 

When the page loads, I call the following code:

 

var allIntegerTextboxes = getAllByNodeAttribute("tagName", "mkw:IntegerTextbox");

 

When this runs in IE 6, the array ‘allIntegerTextboxes’ contains the one node, just as I expect. However, in FireFox, there is nothing. I have tried calling that function with a first parameter of “nodeName” and “localName” but the result is the same.

 

Now, if I grab that element by the id (foo1) and iterate over all of the keys and values of that node, the value of the “tagName” attribute (as well as the other two I mentioned) shows the value I expect. Am I missing something obvious (or not so obvious)?

 

Thanks,
Jason Bunting

 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/383 - Release Date: 7/7/2006


Reply via email to