Ajax Layer JavaScript DHTML

http://dynapi.sourceforge.net/
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999


DynAPI Examples - DynLayer Anchor - Stretching


dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.library');
dynapi.library.include('dynapi.api');


var back=new DynLayer(null,null,null,null,null,'#eeeeee');
back.setAnchor({left:'10%',top:'10%',stretchH:'80%',stretchV:'80%'})
var nw = back.addChild(new DynLayer(null,null,null,null,null,'blue'))
nw.setAnchor({left:'1%',top:'1%',stretchH:'5%',stretchV:'5%'});
var ne = back.addChild(new DynLayer(null,null,null,null,null,'blue'))
ne.setAnchor({right:'1%',top:'1%',stretchH:'5%',stretchV:'5%'});
var se = back.addChild(new DynLayer(null,null,null,null,null,'blue'))
se.setAnchor({right:'1%',bottom:'1%',stretchH:'5%',stretchV:'5%'});
var sw = back.addChild(new DynLayer(null,null,null,null,null,'blue'))
sw.setAnchor({left:'1%',bottom:'1%',stretchH:'5%',stretchV:'5%'});
var b1 = back.addChild(new DynLayer(null,null,null,null,null,'yellow'))
b1.setAnchor({left:'20%',top:'40%',stretchH:'15%',stretchV:'40%'});
var b2 = back.addChild(new DynLayer(null,null,null,null,null,'red'))
b2.setAnchor({left:'36%',top:'30%',stretchH:'15%',stretchV:'50%'});
var b3 = back.addChild(new DynLayer(null,null,null,null,null,'navy'))
b3.setAnchor({left:'52%',top:'20%',stretchH:'15%',stretchV:'60%'});
var b4 = back.addChild(new DynLayer(null,null,null,null,null,'lime'))
b4.setAnchor({left:'68%',top:'10%',stretchH:'15%',stretchV:'70%'});
var b5 = back.addChild(new DynLayer(null,null,null,null,null,'black'))
b5.setAnchor({left:'15%',top:'81%',stretchH:'75%',stretchV:1});
dynapi.document.addChild(back);



Resize your browser to stretch the layers below:



           
       
dynapi.zip( 791 k)