Hi,

It seems it was a timing issue. When I moved the DynDocument creation
statement(s) away from "DynAPI.onLoad" to the event triggered show/hide
routine, it worked.

However, I seem to have stumbled on another similar, yet completely
different, issue:

When the framed page (A) - the one that owns the DynLayer in the other
frame - triggers an update of the other frame (B), the content of B is
momentarily invalidated. If the user triggers the show/hide routine in A,
this generates an error since B is currently invalid and of course thus
doesn't support DynAPI functions. As soon as frame B is un-invalidated (the
HTML is read and JS libraries loaded), everything works great.

I've tracked it to an unconditional "alert" in
"DynAPIObject.prototype.errorHandler" in "js\dynapi.js". For testing
purposes I've commented this statement out, and disabled script error from
popping up in IE, and this seems to do the trick.

However, that will in effect turn off any error message, making valid errors
very hard to track. And this "hack" is definitely not pretty.

Is there another way to handle errors more sensible ?
Or how about introducing (persistant) error levels, and enabling setting
these on/off.

Best regards / Med venlig hilsen
Lars V. Nielsen
--------------------------------------------------------
Hvenegaard & Meklenborg
Rugaardsvej 55, DK-5000 Odense C
Denmark
http://www.hvm.dk
----- Original Message -----
From: "Raymond Irving" <[EMAIL PROTECTED]>
To: "Raymond Irving" <[EMAIL PROTECTED]>; "Lars V. Nielsen" <[EMAIL PROTECTED]>;
"DynAPI Help List" <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 9:35 PM
Subject: Re: [Dynapi-Help] Running a DynLayer in one frame from another
frame ?


> Strange! when your message is viewed in HTML it shows
> DynAPI.onfiltered but when in text I see
> DynAPI.onLoad.
>
> Anyway I would suggest to break apart the code and and
> do a simple test. Also make sure that all your pages
> are loaded from the same domain.
>
> --
> Raymond Irving
>
> --- Raymond Irving <[EMAIL PROTECTED]> wrote:
> > Not too familiar with 2.5.7 but shouldn't that be
> > DynAPI.onLoad instead on
> > --- "Lars V. Nielsen" <[EMAIL PROTECTED]> wrote:
> > > Y'all,
> > >
> > > I'm trying to show/hide a popup layer in one
> > frame,
> > > while controlling it by events fired in another
> > > frame.
> > > I've tested the example shown in
> > >
> >
> http://dynapi.sourceforge.net/doccenter/index.php?DynDocuments
> > > with succes.
> > >
> > > However, the same setup doesn't work in my (huge)
> > > real project.
> > >
> > > The main difference from the example is that I'm
> > > using DynAPI heavily in the target frame by
> > itself.
> > > So it might be a question of having several
> > > instances of DynAPI conflicting, but I'm unsure
> > > whether this can be/is the case.
> > >
> > > The immidiate error occurs immidiately when I - in
> > > my "menu" frame page/document - attempt to attach
> > my
> > > map frame page/document as a DynDocument object.
> > >
> > >  var mapFrameDoc;
> > >  DynAPI.onLoad = function () {
> > >   mapFrameDoc = new DynDocument(parent.map);
> > >   DynAPI.addChild(mapFrameDoc); // <-- yields an
> > > error: "An object is required" (or something of
> > that
> > > sort)
> > >   //...
> > > }
> > >
> > > I've tested whether the "mapFrameDoc" variable is
> > > defined, and it seems to be.
> > >
> > > I've tried a work-around by defining the popup
> > layer
> > > in the map page/document, and just attaching to it
> > > from the menu page/document, but that yields an
> > > error that indicates that the attached object
> > isn't
> > > recognized as a DynLayer (I can use setHTML and
> > > setVisible methods on it). And I can't find any
> > > examples to support me in this approach :-(
> > >
> > > Have anyone tried to do this ?
> > > Can anyone shed some light on possible instance
> > > conflicts ?
> > >
> > > Using 2.5.7
> > >
> > > TIA
> > >
> > > Best regards / Med venlig hilsen
> > > Lars V. Nielsen
> > >
> >
> --------------------------------------------------------
> > > Hvenegaard & Meklenborg
> > > Rugaardsvej 55, DK-5000 Odense C
> > > Denmark
> > > http://www.hvm.dk
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
> >
> >
> >
> -------------------------------------------------------
> > This SF.net email is sponsored by: SlickEdit Inc.
> > Develop an edge.
> > The most comprehensive and flexible code editor you
> > can use.
> > Code faster. C/C++, C#, Java, HTML, XML, many more.
> > FREE 30-Day Trial.
> > www.slickedit.com/sourceforge
> > _______________________________________________
> > Dynapi-Help mailing list
> > [EMAIL PROTECTED]
> >
> https://lists.sourceforge.net/lists/listinfo/dynapi-help
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
> The most comprehensive and flexible code editor you can use.
> Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
> www.slickedit.com/sourceforge
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dynapi-help
>
>



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to