try these replacement methods for inline.js
DynLayer.prototype.updateValues=function() {
if (is.ns4) {
this.x=parseInt(this.css.left)
this.y=parseInt(this.css.top)
this.w=is.ns4? this.css.clip.width : parseInt(this.css.width)
this.h=is.ns4? this.css.clip.height : parseInt(this.css.height)
if (is.ns4)
this.clip=[this.css.clip.top,this.css.clip.right,this.css.clip.bottom,this.c
ss.clip.left]
this.bgColor=this.doc.bgColor!="this.doc.bgColor"?this.doc.bgColor:null
this.bgImage=this.elm.background.src!=""?this.elm.background.src:null
this.html = this.innerHTML = this.elm.innerHTML = ""
}
else if (is.ie || is.ns5) {
this.x=this.elm.offsetLeft
this.y=this.elm.offsetTop
this.w=is.ie4? this.css.pixelWidth||this.getContentWidth()
:this.elm.offsetWidth
this.h=is.ie4? this.css.pixelHeight||this.getContentHeight()
:this.elm.offsetHeight
this.bgImage = this.css.backgroundImage
this.bgColor = this.css.backgroundColor
this.html = this.innerHTML = this.elm.innerHTML
}
this.z=this.css.zIndex
var b=this.css.visibility
this.visible=(b=="inherit"||b=="show"||b=="visible"||b=="")
}
DynAPI.isDirectChildOf=function(l, parent) {
if(is.ns4) return (l.parentLayer == parent)
if(is.ie){
for(var p=l.parentElement;p;p=p.parentElement)
if(p.tagName.toLowerCase()=='div') return p==parent
return !parent.tagName
}
if (is.ns5) {
for(var p=l.parentNode;p.isChild;p=p.parentNode)
if(p.tagName.toLowerCase()=='div') return p==parent
return !parent.tagName
}
}
should fix the ns5 problems.
Pascal Bestebroer ([EMAIL PROTECTED])
Software ontwikkelaar
Oberon Informatiesystemen b.v.
http://www.oibv.com
> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]Namens Jordi
> 'IlMaestro'
> Ministral
> Verzonden: woensdag 20 december 2000 10:27
> Aan: [EMAIL PROTECTED]
> Onderwerp: Re: [Dynapi-Help] Okay, still making progress and, is this
> the right place?
>
>
> I added the isDirectChildOf() method because when retrieving
> the layer structure
> from a given document, due to the fact that in IE all layers
> share one single
> document, scanning the document would give you all layers as
> being in the same
> level of the hierarchy. Therefore we need to know if, given
> two layers, the
> second is a child of the first. This I did before NS6 was
> released, so there was
> no support for it.
>
> I can't test your code because NS6 refuses to run in my
> machine ( if it did, I
> would have fixed the inline.js myself weeks ago ), but as
> long as it does the
> job It should be OK.
>
> Now into the second problem.
>
> The code in updateValues suffers from the same problem: there
> is the IE part and
> the NS part. The is.ns test will detect any Netscape, but the code is
> implemented having NS4 in mind. The this.elm property in NS4
> points to the
> phisical Layer, that is the propietary LAYER element, and in
> order to get to the
> background image we access its background.src property.
>
> However, this property is no longer there in NS6, so the
> script generates an
> error. You should replace the test with is.ns4 and add a
> is.ns5 that does the
> updating by accessing the proper properties in Ns6. I'm not
> that fanmiliar with
> the NS6 DOM yet, but it may be very similar to the explorer
> code and you might
> be able to reuse most of the code.
>
> Hope this is of any help
>
>
> Matthew Shirey wrote:
>
> > 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
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/mailman/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help