Hi,

In dynapi 2.5 you can only call one function with
DynAPI.onLoad. DynAPI 2.9 supports the loading of more
than one functions at load time. 

Here's what the code should look like:

DynAPI.onLoad=function() {
        lp = new LoadPanel();
        lp.setHTML("nada por aqui...");
        
        lp.setSize(480,280); // height will be overwritten by
default
        lp.moveTo(175,260);     // <-- NOTE: lp will overlap lp2
        lp.setZIndex(4);
        
        counter = 0;
        var el = new EventListener();
        el.onload = function(e) {
                status = 'got load event '+ counter++;
        }
        
        lp.addEventListener(el);
        
        DynAPI.document.addChild(lp);

        lp2 = new LoadPanel();
        lp2.setURL('images/empresa_r2_c1.jpg');
        
        lp2.setSize(758,185);
        lp2.moveTo(15,0);       // <-- NOTE: lp will overlap lp2
        lp2.setZIndex(2);
        
        DynAPI.document.addChild(lp2);
}

NOTE: lp will overlap lp2

As for the setURL() and image path everything looks ok
to me. Make sure that the page to the image is
correct.

--
Raymond Irving

--- Webmaster <[EMAIL PROTECTED]> wrote:
> Hi, i have this code and it gives me error on
> Internet Explorer 6 as if
> the objects weren't defined, i'm pretty lame on JS
> so maybe it's a
> syntax error or something, but i just don't see it,
> here's the code:
> 
>
--------------------------------------------------------------
> <head>
> <script language="Javascript"
> src="src/dynapi.js"></script>
> <script language="Javascript">
> DynAPI.setLibraryPath('src/lib/');
> DynAPI.include('dynapi.api.*');
> DynAPI.include('dynapi.event.*')
> DynAPI.include('dynapi.gui.loadpanel.js');
> </script>
> <script language="Javascript">
> DynAPI.onLoad=function() {
>       lp = new LoadPanel();
>       lp.setHTML("nada por aqui...");
>       
>       lp.setSize(480,280); // height will be overwritten
> by default
>       lp.moveTo(175,260);
>       lp.setZIndex(4);
>       
>       counter = 0;
>       var el = new EventListener();
>       el.onload = function(e) {
>               status = 'got load event '+ counter++;
>       }
>       
>       lp.addEventListener(el);
>       
>       DynAPI.document.addChild(lp);
> }
> DynAPI.onLoad=function() {
>       lp2 = new LoadPanel();
>       lp2.setURL('images/empresa_r2_c1.jpg');
>       
>       lp2.setSize(758,185);
>       lp2.moveTo(15,0);
>       lp2.setZIndex(2);
>       
>       DynAPI.document.addChild(lp2);
> }
> //-->
> </script>
> </head>
>
--------------------------------------------------------------
> Thanks for help.
> 
> Regards!
> 
> PS: Also for loading an image setURL is ok or better
> to use a dedicated
> functions? Ah, and about paths, they are ok, this
> script worked until i
> added lp2 to it... 
> 
> 
> 
> 
>
-------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/dynapi-help


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to