From: Guangyi Wu <gua...@al...> - 2000-11-22 09:06:41
|
I am afraid the new version has the same problem. Consider the following code in the DynLayer.EventMethod ===== var realsrc=is.ie ? e.srcElement:e.target var which=(is.ie||is.ns5)?e.button:e.which var src=realsrc.lyrobj||dyndoc if (!src) return true ===== if there is html code in the most underlying layer, the e.srcElement points to an element in that layer. Hence, realsrc.lyrobj is undefined and src is assigned to dyndoc, and the original layer and the layer between it and dyndoc cannot get the event. I change the line var src=realsrc.lyrobj||dyndoc to var src=realsrc.lyrobj||this.lyrobj and it works for me in an example file (the label from Dan) to catch the event. But I am not sure if this modification is correct. Another often mentioned workaround is to add a cover layer to catch the events. I come into this problem when I test the Dan's new label, which removes the cover layer. br George > -----Original Message----- > From: Pascal Bestebroer [mailto:pb...@oi...] > Sent: Wednesday, November 22, 2000 9:36 AM > To: dyn...@li... > Subject: RE: [Dynapi-Help] Event Problems - dyndoc.id > > > EventMethod is called on any mouse event on the corresponding layer or > document. > Try upgrading to the latest version, it might fix some > problems with this.. > > I think the problem might be in your code somewhere.. events > should work > normally on inline layers. > > Pascal Bestebroer > pb...@oi... > http://www.oibv.com > > > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Eric Gravel > Verzonden: woensdag 22 november 2000 8:36 > Aan: dyn...@li... > Onderwerp: [Dynapi-Help] Event Problems - dyndoc.id > > > I'm getting errors in IE 5.0 The first occurence is when I move my > mouse over an inline layer. The second instance is when I click an > image map that is inside a 2 level deep child layer (child layer of > a parent child layer). > > When debugging the code using MS Development Environment, it points > the error as belonging to file core.api.events.js: > > src=DynAPI.getDocument(realsrc.dyndoc.id) > > The line belongs to the following code block: > > var realsrc=is.ie ? e.srcElement:e.target > var which=(is.ie||is.ns5)?e.button:e.which > var src=realsrc.lyrobj > if (!src) { > src=DynAPI.getDocument(realsrc.dyndoc.id) > if (!src) return true > } > > So e.srcElement.lyrobj does not exists. Why? The other question > I have is when does this function, DynLayer.prototype.EventMethod, > gets called? > > If needed, I can provide the whole code. > > > Eric > ______________________________________________________________ > ______________ > _________ > Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com _______________________________________________ Dynapi-Help mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-help _______________________________________________ Dynapi-Help mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-help |