From: Dan S. <dy...@fu...> - 2000-12-06 15:34:00
|
You will need a reference to the loadpanel. In Netscape you might be able to use this: <a href="javascript://" onclick="this.lyrobj.setURL('file.html')"> "this" in the content of a layer refers to the layer element. We have a .lyrobj property that points to the DynLayer (or DynLayer based widget). I can't remember if "this" inside a link returns the link or the document/layer. If it returns the link we'd need to update LoadPanel to search through all the links in the page and drop a property like ".loadpanel" onto each link object so the could be made like "this.loadpanel.setURL()". For IE if you are using an IFrame you will need to have a different reference. We can add some code into LoadPanel to make one. "this" in an Iframe should refer to the frame element (or possibly the frame's document), so you'd add "frame.lyrobj = this" or "frame.document.lyrobj = this" somewhere in the LoadPanel code after the frame has been created. Or again it might be necessary to manually attach a property to each link. It would just require some tweaking but it's definately possible. Dan On Wed, Dec 06, 2000 at 02:15:32PM -0000, Cameron Hart wrote: > > I'm not sure if this is what you're looking for, but why not try > > something like ... > > > > <a href="#" onClick="whateverLayer.setHTML('page.html')">My Link</a> > > > > If you don't know what whateverLayer is in adavnce, you could use > > document.write to change the name of the layer. > > that works if you know what whatevenLayer is, but unfortunately I don't. I > thought that the document loaded into the loadpanel would know what > whateverLayer is (ie the layer it got loaded into) but it doesn't seem to. > > I'm not what you mean by using document.write to change the name of the > layer? > > Thanks, > > Cameron. > > > > > Let me know if you come across a better solution, or indeed if > > anyone has come across a > > solution to submitting a form and giving it a target inside a loadpanel. > > > > Mark > > > > Cameron Hart wrote: > > > > > I've got a question about links inside html files loaded into a > > loadpanel. > > > > > > I am building a site that uses multiple loadpanels at the same time. All > > > these loadpanels contain external html documents. Some of these > > documents > > > have links in them. If you click on a link in a document loaded in a > > > loadpanel, it loads the new page over the top of the main > > window, not into > > > the loadpanel. That's not good ;-) > > > > > > I've tried making the links javascript calls to call a setURL > > to load a new > > > document in the same loadpanel. The problem is that the > > document inside the > > > loadpanel doesn't seem to be "aware" of what loadpanel it is > > in. It's parent > > > appears to be the top level DynDocument, not the LoadPanel object. > > > > > > Does anyone have any ideas on how I can tell a document loaded into a > > > loadpanel, this is your loadpanel, use setURL on this? > > > > > > Thanks, > > > > > > Cameron. > > > > > > _______________________________________________ > > > 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 > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help |