Just be aware that you can't load scripts into the loaded document,
because only the text between the body tags is loaded into the
loadpanel (not the whole page). Also, the variable "Test" could cause
some problems as well. I've had problems using that variable name in
the past.
Also, you don't have to set these by default:
Test.useILayer(false)
Test.useIFrame(true)
--
// Robert Rainwater
On 1/17/2001, 11:25:11 AM EST, Mathias wrote about "[Dynapi-Help] Can't load a page in
a DynLayer":
> Hi,
> I have a problem with IE :
> When I try to load a page which contents Dynapi in a DynLayer (using LoadPanel and
>setURL), it works in Netscape, but not in IE... Can somebody help me ?
> Thx
> ------- First Page :
> <html>
> <head>
> <script language="Javascript" src="../js/dynapi.js"></script>
> <script language="Javascript">
> DynAPI.setLibraryPath('../js/lib/');
> DynAPI.include('dynapi.api.*');
> DynAPI.include('dynapi.gui.dynimage.js');
> DynAPI.include('dynapi.gui.loadpanel.js');
> DynAPI.include('dynapi.util.thread.js');
> DynAPI.include('dynapi.util.pathanim.js');
> DynAPI.include('dynapi.util.cookies.js');
> </script>
> <script language="Javascript">
> DynAPI.onLoad=function()
> {
> Test = new LoadPanel()
> Test.setSize(400,400)
> Test.moveTo(50,50)
> Test.useILayer(false)
> Test.useIFrame(true)
> DynAPI.document.addChild(Test)
> }
//-->>
> </script>
> </head>
> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
>marginheight="0">
> <a href="javascript:Test.setURL('test.php')">Click</a>
> </body>
> </html>
> ------- Second page (loaded in a LoadPanel) :
> <html>
> <head>
> <script language="Javascript" src="../js/dynapi.js"></script>
> <script language="Javascript">
> DynAPI.setLibraryPath('../js/lib/');
> DynAPI.include('dynapi.api.*');
> DynAPI.include('dynapi.gui.dynimage.js');
> DynAPI.include('dynapi.gui.loadpanel.js');
> </script>
> <script language="Javascript">
> DynAPI.onLoad=function()
> {
> Machin = new DynLayer(null,10,10,50,50)
> Machin.setBgColor("#0000FF")
> window.DynAPI.document.addChild(Machin)
> }
//-->>
> </script>
> </head>
> <body bgcolor="#FF0000" leftmargin="0" topmargin="0" marginwidth="0"
>marginheight="0">
> Machin et truc
> </body>
> </html>
> Mathias
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help