|
Hi ,
I just start working with DynAPI2 (and javascript) and I found
some problem, where I think, it's common for people, creating websites:
Creating a site, You will not know, whether people enabled the
javascript option or not. So, first of all, one would like to offer a kind
of menu, that works on both ways.
Full of enthusiasm I coded my first idea. Using two layers, one for a small square/icon, following the mouse and one for to detect, when the mouse moves over the standard menu link. So far so good, but the linklayer will no more give me a chance to activate the link (of course, I will not use setHTML() because this menu link is my no javascript option). So, what's the solution? Should I return to the proprietary way of creating maps independant of DynAPI2? I don't think so. Next I thought about using the Z-index, but it will work only inside javascript rsp. DynAPI2. Well, now it could be Your turn ;-) . You got an idea how to ship this? I'll send You my (reduced) approach in the appendix. best regards
Peter M�ller --------------------------------------------------------
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META name="GENERATOR" content="Mozilla/4.7 [de] (Win95; I) [Netscape]"> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/'); DynAPI.include('dynapi.api.*'); </script> <script language="Javascript"> function debug(txt,win) { if (win ==1) document.forms[0].f1.value=txt if (win ==2) document.forms[0].f2.value=txt //window.status = txt + "(" + win +")" }
DynAPI. { var nBreite=15; var nHoehe=15; var BgColorActive='green'; var BgColorPassive='blue'; LayerLbl1 = new DynLayer() LayerLbl1.setSize(nBreite,nHoehe); LayerLbl1.moveTo(2,98); LayerTxt1 = new
DynLayer()
LayerTxt1.setSize(100,20); LayerTxt1.setBgColor('yellow'); LayerTxt1.moveTo(35,95); //LayerTxt1.setZIndex(10) DynAPI.document.addChild(LayerLbl1)
DynAPI.document.addChild(LayerTxt1) ListenerTxt1 = new
EventListener(DynAPI.document);
ListenerTxt1. { LayerLbl1.setBgColor(BgColorActive); debug( 'Last Event: onmouseover',1) } ListenerTxt1. { LayerLbl1.setBgColor(BgColorPassive); debug( 'Last Event: onmouseout',1) } LayerTxt1.addEventListener(ListenerTxt1); } </script> </HEAD> <BODY> <FONT size=-1> <form> <textarea rows=1 cols=60 name=f1> </textarea> <br> <textarea rows=1 cols=60 name=f2> </textarea> </form> <P> <br> <A HREF="start.htm" TARGET="_Main" Title="Unsere Startseite">Willkommen</A> </P> </BODY> </HTML> |
