First, is this the right place to be discussing this?  Alternatively, should
it be moved over to the Dev list?

Okay, I think I have located part of the NS 6 problem on inline layers but I
need a little feedback.  I found that the isDirectChildOf() method was ...
behaving badly... in NS 6.  The function was not returning true or false.
It appears parentLayer is not a property of the div object in NS 6.  It
appears from my reading at w3.org that the property that I am looking for is
parentNode and it seems to be structured much like the parentElement
property which is what is used in IE.  So I duplicated the method used for
IE with some minor changes.  Here's my new version of the isDirectChildOf()
method.  Can someone with a little more familiarity with the API and JS look
at the code and tell me if it is solid or am I just smoking some funky
weed...

DynAPI.isDirectChildOf = function(l, parent) {
        if(is.ns4) {
                return (l.parentLayer == parent)
        }
        if(is.ns5) {
                for(var p=l.parentNode;p;p=p.parentNode) {
                        tgName = String(p.tagName);
                        if(tgName.toLowerCase()=='div') return p == parent;
                }
                return !parent.tagName;
        }
        for(var p=l.parentElement;p;p=p.parentElement)
                if(p.tagName.toLowerCase()=='div') return p==parent
        return !parent.tagName
}

Okay that seems to solve my first problem.  The new problem is in the
updateValues() method.  This line:

this.bgImage = this.elm.background.src!=""?this.elm.background.src:null

produces this error:

        this.elm.background has no properties


My brain is about dead on this today... so any input on this new problem
would be much appreciated.

Thanks,

-- Matthew Shirey


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help

Reply via email to