First time poster here.  I'm wobbly on event
listeners.  What I'm trying to do is call a load panel
when the user clicks one of the list items (doing some
online documentation).  here's the code:

<html>
<script language="Javascript"
src="../src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../src/lib/')
DynAPI.include('dynapi.api.*')
DynAPI.include("dynapi.gui.label.js")
DynAPI.include("dynapi.gui.list.js")
DynAPI.include("dynapi.gui.loadpanel.js");
</script>
<script language="Javascript">

//* start add selection list ------------*//

DynAPI.onLoad = function() {
        list = new List()
        list.moveTo(10,48)
        list.setWidth(275)
        list.setBgColor('#000000')
        list.boldOnSelect(true)
        list.add("Interpreting Instructions",1)
        list.add("Client Specific Information",2)
        list.add("General Procedures Documentation",3)
        list.add("Program Documentation",4)
        list.add("Standard Layouts",5)
        list.add("Shipping Procedures",6)
        list.add("Reporting",7)
        list.add("DOS Prompt",8)
        DynAPI.document.addChild(list)
        
//* end add selection list ------------*//

//* start add information panel ------------*//

        lp = new LoadPanel();
        lp.setSize(320,348); // height will be overwritten by
default
        lp.moveTo(290,48);
        lp.setBgColor('lightblue');
        lp.setHTML("<b>no file loaded</b>");
        counter = 0;
        var el = new EventListener();
        el.onload = function(e) {
                status = 'got load event '+ counter++;
        }
        lp.addEventListener(el);
        
        DynAPI.document.addChild(lp);

//* end add information panel ------------*//

}

//* end scripts ------------*//
</script>

</head>
<body bgcolor="#ffffff">

<!-- placeholder -->

</body>
</head>

Thanks, 
Toby Folwick

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to