From: Michael P. <mp...@ph...> - 2001-07-16 12:10:59
|
I am not sure how old you code is. there may have been a few widgets that snuck through without being fully implemented. Also, i think the popup widget was originally from pascal's dynacore disto and may not be fully compatible with the official dynapi. Carsten Meiselbach wrote: > Hello! > > I'm a real novice with the DynAPI and trying to implement a > Popup-menu with the AfroAPI-extension. I've got the Popup > example from this list, but it doesn't work. > > IE 5+ and Netscape 4.5+ giving some erros: > 'group is undefined' at start and > 'is is undefined' at unload. > > This is the JavaScript-Code (from the example): > > <SCRIPT LANGUAGE="JavaScript" SRC="dynapi/dynapi.js"></SCRIPT> > <SCRIPT LANGUAGE="JavaScript"> > <!-- > > DynAPI.setLibraryPath('dynapi/lib/'); > DynAPI.include('afroapi.api.*'); > DynAPI.include('afroapi.events.mouse'); > DynAPI.include('afrogui.core.style'); > DynAPI.include('afrogui.core.cell'); > DynAPI.include('afroapi.ext.layer'); > DynAPI.include('afrogui.widgets.popup'); > > myListener = new EventListener(DynAPI.document); > myListener.onmousedown=myListener.onrtmousedown=function(e) { > myPopUp.Collapse(); > e.cancelBrowserEvent(); > }; > myListener.onrtmouseup=function(e) { myPopUp.Pop(e.getX(), e.getY()); }; > > DynAPI.theme=new DynStyle(); > DynAPI.theme.scheme.face='#D4D0C8'; > DynAPI.theme.scheme.light='#ECE8E3'; > DynAPI.theme.scheme.dark='#9E8A76'; > DynAPI.theme.font.bold=false; > DynAPI.theme.font.size=2; > DynAPI.theme.font.family='tahoma'; > DynAPI.theme.scheme.bgSelected='#A0C8EF'; > > myPopUp = new PopUp(100); > myPopUp.add('Back',null,'javascript:history.back()','Return to previous page in history list'); > myPopUp.add('Forward',null,'javascript:history.forward()','Move forward to next page in history list'); > myPopUp.add('Reload',null,'javascript:location.replace(location.href)','Reload the current page'); > myPopUp.add('-'); > myPopUp.add('View Source',null,'view-source:'+location.href,'View the source of the current page'); > > DynAPI.onLoad=function() { > DynAPI.document.addChild(myPopUp); > DynAPI.document.addEventListener(myListener); > }; > > function show_popup() { > > xpos = event.clientX; > ypos = event.clientY; > > myPopUp(); > } > > //--> > </SCRIPT> > > Carsten > > @ugenblick! - Softwaredevelopment & Web-Design > Ledeburstr. 15 - 33102 Paderborn - Germany > fon 049 (0)5251 282698 - mobile 049 (0)173 2714396 > http://www.augenblick-software.de > mailto:ca...@au... > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev -- Michael Pemberton mp...@ph... ICQ: 12107010 |