1. try using DynAPI.onResize=function() { }
2. You know there's a popup widget availabe right?
3. pass.
Pascal Bestebroer ([EMAIL PROTECTED])
Software ontwikkelaar
Oberon Informatiesystemen b.v.
http://www.oibv.com
> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]Namens Chad R. Thomson
> Verzonden: donderdag 15 februari 2001 14:26
> Aan: Dynapi-Help
> Onderwerp: [Dynapi-Help] Solution in-sight
> Urgentie: Hoog
>
>
> I'm sure that someone can provide me with the insight I need
> to get this to
> work properly.
> Problems:
> 1. need resize event handler: recalc size of menus when
> resize event fires
> 2. menu popup: not a problem... handle menu targets/links? handle SUB
> menus!!!!
> 3. Absolute positioning... this look aweful in NS. Need
> suggestions to make
> it 'work' better in NS.
>
> I have included a scaled-back snippet of the object of my AFFLICTION.
> Please advise as to how to proceed.
>
> Chad.
>
> <!------------- BEGIN SAMPLE SNIPPET --------------------->
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <html>
> <head>
> <title>Help me</title>
> <Script language="Javascript" src="/dynapi/dynapi.js"></script>
>
> <script>
> var tableHeight = 185;
> var h,w;
>
> DynAPI.setLibraryPath('/dynapi/lib/');
>
> DynAPI.include('dynapi.api.*');
> DynAPI.include('dynapi.gui.label.js');
> DynAPI.include('dynapi.gui.list.js');
> DynAPI.include('dynapi.ext.inline.js');
>
> DynAPI.onLoad=function() {
> w = this.getDocument().getWidth()
> h = this.getDocument().getHeight()
>
> //actual 'static' layer
> menuLayer=new DynLayer(null,0,(h -
> tableHeight),w,tableHeight,'#ffffff');
> //menuing system child
> menuSystem=new DynLayer(null,0,0,w,tableHeight,'#000000');
>
> layerStr = '<div id="nav1" class="nav"
> style="position:absolute;width:' + w +';height='+tableHeight+';">';
> layerStr += '<table width="100%" border="1" cellspacing="0"
> cellpadding="0" height="' + tableHeight + '"> ';
> layerStr += ' <tr> ';
> layerStr += ' <td width="200" bgcolor="#0099FF"
> rowspan="3"> ';
> layerStr += ' <div id="tickertape" name="tickertape"><div
> id="subtickertape"
> class="subtickertapefont">Initializing...</div></div> ';
> layerStr += ' </td> ';
> layerStr += ' <td> ';
> layerStr += ' <table width="100%"
> bgcolor="#FFFFFF" border="0"
> cellspacing="0" cellpadding="0" height="140"> ';
> layerStr += ' <tr valign="top" height="20"> ';
>
> layerStr += ' <td> </td> '; //Menus
> will appear HERE
>
> layerStr += ' </tr> ';
> layerStr += ' <tr> ';
> layerStr += ' <td colspan="13" align="center"> ';
> layerStr += ' <table width="100%" bgcolor="#000000"
> border="0" cellspacing="0" cellpadding="0" align="center"
> height="160"> ';
> layerStr += ' <tr> ';
> layerStr += ' <td align="center"><IMG alt=""
> height="90" border=0 name="solutions" src="/images/solutions_mask.jpg"
> onmouseover="this.src=\'/images/solutions_over.jpg\'"
> onmouseout="this.src=\'/images/solutions_mask.jpg\'"></td> ';
> layerStr += ' <td align="center"><IMG alt=""
> height="90" border=0 name="services" src="/images/services_mask.jpg"
> onmouseover="this.src=\'/images/services_over.jpg\'"
> onmouseout="this.src=\'/images/services_mask.jpg\'"></td> ';
> layerStr += ' <td align="center"><IMG alt=""
> height="90" border=0 name="products" src="/images/products_mask.jpg"
> onmouseover="this.src=\'/images/products_over.jpg\'"
> onmouseout="this.src=\'/images/products_mask.jpg\'"></td> ';
> layerStr += ' </tr> ';
> layerStr += ' <tr> ';
> layerStr += ' <td align="center"
> class="bottommenu"><a
> href="addserv/index.html" target="_top">Solutions</a></font></td> ';
> layerStr += ' <td align="center"
> class="bottommenu"><a
> href="addserv/index.html" target="_top">Services</a></font></td> ';
> layerStr += ' <td align="center"
> class="bottommenu"><a
> href="addserv/index.html" target="_top">Products</a></font></td> ';
> layerStr += ' </tr> ';
> layerStr += ' </table> ';
> layerStr += ' </td> ';
> layerStr += ' </tr> ';
> layerStr += ' </table> ';
> layerStr += ' </td> ';
> layerStr += ' </tr> ';
> layerStr += '</table>';
> layerStr += '</div>';
> menuSystem.setHTML(layerStr);
>
> //add a layer that will be a header for a 'drop down'
> popup list
> var companyLyr = new DynLayer();
> companyLyr.setBgColor('#ffffff')
> companyLyr.setHTML('<a href="" class="mainmenu">Company</a>')
> companyLyr.moveTo(290,2)
>
> menuSystem.addChild(companyLyr)
>
> //add the drop down list
> companylist = new List()
> //companylist.moveTo(350,20) //need to position it properly
> companylist.setWidth(100)
> companylist.setBgColor('#000000')
> companylist.boldOnSelect(true)
> companylist.add("Overview",1)
> companylist.add("Dev Center",2)
> companylist.setVisible(false);
> menuSystem.addChild(companylist);
>
> //there'd be ALOT more of these.
> //need to create SUB menus?? HOW!!?!?
>
> menuLayer.addChild(menuSystem);
> DynAPI.document.addChild(menuLayer);
> menuLayer.floatLayer();
> }
>
> // NEED TO FIND A RESIZE METHOD HANDLER TO RECALC
> // SIZE OF menuLayer (et al)
>
> </script>
> </head>
>
> <body>
>
> <script>
> DynLayer.prototype.floatLayer=function() {
> this.originalY=this.y
>
> if (!this.object) {
> this.object = this.id + "Obj"
> eval(this.object + "=this")
> }
> this.floatLoop()
> }
>
> DynLayer.prototype.floatLoop=function() {
> pageY=is.ie?document.body.scrollTop:window.pageYOffset
> this.moveBy(null,((this.originalY+pageY)-this.y)/2)
> setTimeout(this.object+'.floatLoop()',1)
> }
> </script>
>
> </body>
> </html>
>
> <!------------- END SAMPLE SNIPPET ----------------------->
> Chad.
>
> ******************************************
> Chad R. Thomson
> Senior Programmer/Analyst
> USI - Bravepoint
> WebSpeed, Java, B2B & B2C Specialists
> 888-874-1880 x3027
> 800-854-7155 FAX
> http://www.bravepoint.com/
> A creative Web strategy is not an option - it's a necessity
> ******************************************
> Participating in the FreeFrameWork initiative,
http://freeframework.org
"FreeFrameWork = WebSpeed + Open Source"
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help