From: Cameron H. <ca...@bi...> - 2000-12-06 13:07:46
|
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. |
From: Mark P. <mar...@hi...> - 2000-12-06 13:48:31
|
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. 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 |
From: Cameron H. <ca...@bi...> - 2000-12-06 14:15:52
|
> 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 |
From: Mark P. <mar...@hi...> - 2000-12-06 14:45:14
|
I was thinking of something along the lines of .... In original document someLayer.setHTML ( 'someWebPage.html?layer=someLayer' ) ; In "someWebPage.html" theParam = <-- code to parse out URL (can't remember what the JS code for this is, but there is a function to do it ) --> document.write ( "<a href='#' onClick='" + theParam + ".setHTML(\'myNewPage.html\')'>My Link</a> .. if you know what I mean. Mark 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 |
From: Matthew S. <PK...@Tu...> - 2000-12-07 20:13:27
|
Well... does javascript in the loaded page actually get executed? I thought it was just treated as HTML Text... M. -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of Mark Pratt Sent: Wednesday, December 06, 2000 6:45 AM To: dyn...@li... Subject: Re: [Dynapi-Help] html links inside loadpanel documents I was thinking of something along the lines of .... In original document someLayer.setHTML ( 'someWebPage.html?layer=someLayer' ) ; In "someWebPage.html" theParam = <-- code to parse out URL (can't remember what the JS code for this is, but there is a function to do it ) --> document.write ( "<a href='#' onClick='" + theParam + ".setHTML(\'myNewPage.html\')'>My Link</a> .. if you know what I mean. Mark 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 _______________________________________________ Dynapi-Help mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-help |
From: Nuno F. <nun...@wi...> - 2000-12-08 15:22:54
|
It works, as long as the code is client-side. For instance PHP or ASP code is treated as text because the file is not processed by the server. I'm trying to find a way to use the setHTML() to get a PHP file processed by the server and displayed on the page (on a layer, of course) without reloading the whole page. I think I can do that in Explorer, using a Iframe. (frame.location="file.php") and copy the HTML produced to a string and setHTML("string") to a layer. Not sure how to do that in NS4+, though because each layer on NS4 is treated like a new document, maybe there's hope yet. NunoF -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of Matthew Shirey Sent: quinta-feira, 7 de Dezembro de 2000 20:13 To: dyn...@li... Subject: RE: [Dynapi-Help] html links inside loadpanel documents Well... does javascript in the loaded page actually get executed? I thought it was just treated as HTML Text... M. -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of Mark Pratt Sent: Wednesday, December 06, 2000 6:45 AM To: dyn...@li... Subject: Re: [Dynapi-Help] html links inside loadpanel documents I was thinking of something along the lines of .... In original document someLayer.setHTML ( 'someWebPage.html?layer=someLayer' ) ; In "someWebPage.html" theParam = <-- code to parse out URL (can't remember what the JS code for this is, but there is a function to do it ) --> document.write ( "<a href='#' onClick='" + theParam + ".setHTML(\'myNewPage.html\')'>My Link</a> .. if you know what I mean. Mark 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 _______________________________________________ Dynapi-Help mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-help |
From: Peter L. <com...@op...> - 2000-12-10 07:59:13
|
Nuno You are on the right track. In ColdFusion there is a problem with database access and variable referencing in the xxx.cfm in the setHTML("xxx.cfm"). Perhaps the same problem also exists in PHP and ASP :-}~ I call another object that does all the database stuff in xxx.cfm using the <cfmodule> tag, subsequently returning pure HTML that you want to load into the panel. Perhaps there is an equivalent on your platform. Regards Peter Luxmore Nuno Ferreira wrote: > It works, as long as the code is client-side. > For instance PHP or ASP code is treated as text > because the file is not processed by the server. > > I'm trying to find a way to use the setHTML() > to get a PHP file processed by the server and > displayed on the page (on a layer, of course) > without reloading the whole page. > > I think I can do that in Explorer, using a Iframe. > (frame.location="file.php") and copy the HTML > produced to a string and setHTML("string") to a layer. > > Not sure how to do that in NS4+, though because each > layer on NS4 is treated like a new document, maybe there's > hope yet. > > NunoF > > -----Original Message----- > From: dyn...@li... > [mailto:dyn...@li...]On Behalf Of Matthew > Shirey > Sent: quinta-feira, 7 de Dezembro de 2000 20:13 > To: dyn...@li... > Subject: RE: [Dynapi-Help] html links inside loadpanel documents > > Well... does javascript in the loaded page actually get executed? I thought > it was just treated as HTML Text... > > M. > > -----Original Message----- > From: dyn...@li... > [mailto:dyn...@li...]On Behalf Of Mark Pratt > Sent: Wednesday, December 06, 2000 6:45 AM > To: dyn...@li... > Subject: Re: [Dynapi-Help] html links inside loadpanel documents > > I was thinking of something along the lines of .... > > In original document > > someLayer.setHTML ( 'someWebPage.html?layer=someLayer' ) ; > > In "someWebPage.html" > > theParam = <-- code to parse out URL (can't remember what the JS code for > this is, but > there is a function to do it ) --> > > document.write ( "<a href='#' onClick='" + theParam + > ".setHTML(\'myNewPage.html\')'>My > Link</a> > > .. if you know what I mean. > > Mark > > 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 > > _______________________________________________ > 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 |
From: Doug M. <do...@cr...> - 2000-12-07 21:30:40
|
code to get param from URL.. .. be sure to escape() you param string if you are using any special chars or spaces, ect. ie: someLayer.setHTML ( 'someWebPage.html?layer=' + escape('someLayer') ) ; (don't need it in above example of course.. :-) ) var mystring; if (location.search.length > 0) mystring = location.search.substring(1); if(mystring.length > 0) { //in the following, the 6 represents the lenght of your param name + the '=' //so if you param is layer (....htm?layer=) then you start counting at 6 mystring = mystring.substring(6, mystring.length - 1); mystring = unescape(mystring); } ----- Original Message ----- From: "Mark Pratt" <mar...@hi...> To: <dyn...@li...> Sent: Wednesday, December 06, 2000 6:45 AM Subject: Re: [Dynapi-Help] html links inside loadpanel documents > I was thinking of something along the lines of .... > > In original document > > someLayer.setHTML ( 'someWebPage.html?layer=someLayer' ) ; > > In "someWebPage.html" > > theParam = <-- code to parse out URL (can't remember what the JS code for this is, but > there is a function to do it ) --> > > document.write ( "<a href='#' onClick='" + theParam + ".setHTML(\'myNewPage.html\')'>My > Link</a> > > .. if you know what I mean. > > Mark > > > 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 > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help |
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 |
From: Raymond S. <dst...@or...> - 2000-12-06 16:21:39
|
Fixed IE problems with buttons in pushpanels not disappearing at all, but now it requires an 'additional' click to remove the button when top/bottom position is reached. <...slide... still there...click...gone...> DS |
From: Cameron H. <ca...@bi...> - 2000-12-06 18:00:40
|
Ummm, I haven't tried tweaking the loadpanel source just yet. I might be using an older version of the loadpanel which doesn't support what you are saying, the version date is 2000.11.09. I've done what you suggested for Netscape and it works kind of :-) This is my new code: LoadPanel.prototype.loadHandler = function(url) { this.url = url if (is.ns4) { if (this.isILayer) { var w = this.loadElement.document.width var h = this.loadElement.document.height } else { var w = this.getContentWidth() var h = this.getContentHeight() } for (var i in this.loadElement.document.links) { this.loadElement.document.links[i].loadpanel = this; } if (this.autoW) this.setWidth(w,false) if (this.autoH) this.setHeight(h,false) } this.isReloading = false this.invokeEvent('load') } Now I have a new problem - when I call set URL, the URL is getting garbled somewhere. Any ideas what is happening there? It seems to get to the setURL method intact, but I haven't looked into it any further than that. I think it would be good to keep the behaviour consistent between browsers, so I thought I would try and do the same thing for links with IE. However, I'm using IE5, which doesn't use IFRAMES, it uses a DIV with a style to load the new document. I don't seem to be able to get to the links object in the same way with IE5. Don't know about IE4, I don't have it. Do you have any ideas on how I can do the same for IE4 and IE5, and should I upgrade to a newer LoadPanel? Thanks!!! Cam. > 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 > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help |
From: Cameron H. <ca...@bi...> - 2000-12-06 18:58:40
|
Talking to myself here, but I've got some new info... > Now I have a new problem - when I call set URL, the URL is getting garbled > somewhere. Any ideas what is happening there? It seems to get to > the setURL method intact, but I haven't looked into it any further than that. I think this might be because I'm trying to open a file over a network and windows 2000 has some proprietry protocol for referencing file servers that netscape doesn't understand. maybe. > so I thought I would try and do the same thing for links with IE. However, > I'm using IE5, which doesn't use IFRAMES, it uses a DIV with a > style to load the new document. I don't seem to be able to get to the links > object in the same way with IE5. Don't know about IE4, I don't have it. IE5 is using Behaviours to load the document. I found something interesting when trying to debug this, if I called showProps(this.loadElement.document) I got an error "Not Implemented". This doesn't bode well for being able to set any document properties with the IE5 behaviour method of loading things. Any new ideas on how to solve this would be greatly appreciated, Thanks, Cameron. |
From: Cameron H. <ca...@bi...> - 2000-12-07 14:53:44
|
I've found a solution that I'm kind of happy with except Netscape act's weird. I've added the folling code to my copy of LoadPanel: LoadPanel.findLoadPanel = function(o) { if (is.ns4) { while (!o.lyrobj) o = o.__parent__; } else if (is.ie) { while (!o.lyrobj) o = o.parentElement; } return o.lyrobj; } Then I use the following for a link in the HTML loaded into loadpanel: <a href="javascript://" onclick="LoadPanel.findLoadPanel(this).setURL('newpage.html')">click me</a> This works perfectly in IE as far as I can tell. However Netscape has a problem. It does successfully load the url into the correct LoadPanel. On the down side it also opens a new window and says cannot find the server <rubbish>. Does anyone know what is causing this to happen? I get the impression that somewhere there is an object with a target or protocol property = javascript:// which is causing the problem? Cheers, Cameron. |
From: Alexey M. <ma...@ca...> - 2000-12-07 15:18:32
|
> <a href="javascript://" > onclick="LoadPanel.findLoadPanel(this).setURL('newpage.html')">click me</a> try <a href=# onclick="LoadPanel.findLoadPanel(this).setURL('newpage.html');return false">click me</a> Also - you know that in Netscape and IE links are in different places - different documents. |
From: Cameron H. <ca...@bi...> - 2000-12-07 16:20:43
|
> try > > <a href=# > onclick="LoadPanel.findLoadPanel(this).setURL('newpage.html');retu > rn false">click > me</a> No cigar, Netscape is still having the same problem :-( > Also - you know that in Netscape and IE links are in different > places - different documents. Netscape is document.links isn't it? Netscape works properly if I construct the link this way: <a href="javascript: objectRef.setURL('newpage.html')">link</a> The problem is a "this" object reference in the onClick is different to a "this" object reference in the href. The onclick reference is within the link text in the Layer, the href reference is in the root document (the DynDocument). I haven't worked out how to find the LoadPanel from the href reference. |
From: Mark P. <mar...@hi...> - 2000-12-07 15:25:03
|
try returning false from your onClick Cameron Hart wrote: > I've found a solution that I'm kind of happy with except Netscape act's > weird. I've added the folling code to my copy of LoadPanel: > > LoadPanel.findLoadPanel = function(o) { > if (is.ns4) { > while (!o.lyrobj) o = o.__parent__; > } > else if (is.ie) { > while (!o.lyrobj) o = o.parentElement; > } > return o.lyrobj; > } > > Then I use the following for a link in the HTML loaded into loadpanel: > > <a href="javascript://" > onclick="LoadPanel.findLoadPanel(this).setURL('newpage.html')">click me</a> > > This works perfectly in IE as far as I can tell. However Netscape has a > problem. It does successfully load the url into the correct LoadPanel. On > the down side it also opens a new window and says cannot find the server > <rubbish>. Does anyone know what is causing this to happen? I get the > impression that somewhere there is an object with a target or protocol > property = javascript:// which is causing the problem? > > Cheers, > > Cameron. > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help |
From: Robert R. <rra...@ya...> - 2000-12-07 05:19:25
|
> Fixed IE problems with buttons in pushpanels not disappearing at all, but > now it requires an 'additional' click to remove the button when top/bottom > position is reached. <...slide... still there...click...gone...> This has now been fixed by calling checkButtons on mouseup. Although, in IE you get weird behavior that I think may be caused by IE's window scrollbar. -- // Robert Rainwater |