|
I have a dynamic web site that use an include
command to switch different templates. So I have two scripts, one loaded in
index.asp and the other in another template that sometime got called in by
index.asp. What happen is I am using DynAPI. on both of them
and I think that is why one overwrite the other? The scripts are below. Any idea
on how to fix it? Thx.
//script 1 in index.asp. An object that slide in
and out
---------------------------------------------------------------
<!--- <SCRIPT
language="Javascript">
DynAPI. { objSpanel = new LoadPanel(); //ObjS
panel
objSpanel.setSize(170,350) objSpanel.moveTo(-155,129); objSpanel.setBgColor("#346767"); objSpanel.setHTML('something here'); objSpanel.do_slide=function() { if (objSpanel.x==-155) objSpanel.slideTo(0,129,10,20) else objSpanel.slideTo(-155,129,10,20) } DynAPI.document.addChild(objSpanel);
} </script> --->
----------------------------------------------------------------
//script 2 in some body template. It's actually an
inline table like iFrame with header and footer station and the body is
scrollable.
----------------------------------------------------------------
<script language="Javascript">
DynAPI. {
var layer1 =
this.document.all['layer1']
var layer2 = this.document.all['layer2'] var layer3 = this.document.all['layer3'] layer1.setSize(500,20) layer2.setSize(500,50) //has to be the same as the scrollpane. layer3.setSize(500,20) lp = new
LoadPanel();
lp.setSize(484,350); // height will be overwritten by default lp.setBgColor('#cccccc'); lp.setHTML('Body Layer'); scrollobj = new ScrollPane(lp); //
label1 will be set as the
content
scrollobj.setSize(500,50); scrollobj.setBgColor('#cccccc'); tblHdrLyr = new
DynLayer();
tblHdrLyr.setSize(500,20); tblHdrLyr.setBgColor('#cccccc'); tblHdrLyr.setHTML('Header Layer'); tblFtrLyr = new
DynLayer();
tblFtrLyr.setSize(500,20); tblFtrLyr.setBgColor('#cccccc'); tblFtrLyr.setHTML('Footer Layer'); if(is.ns){
DynAPI.document.addChild(scrollobj); DynAPI.document.addChild(tblHdrLyr); DynAPI.document.addChild(tblFtrLyr); if(is.ns4){ scrollobj.moveTo(layer2.getPageX(),layer2.getPageY()-65); tblHdrLyr.moveTo(layer1.getPageX(),layer1.getPageY()-96); tblFtrLyr.moveTo(layer3.getPageX(),layer3.getPageY()+70); } else { scrollobj.moveTo(layer2.getPageX()+7,layer2.getPageY()-65); tblHdrLyr.moveTo(layer1.getPageX()+7,layer1.getPageY()-112); tblFtrLyr.moveTo(layer3.getPageX()+7,layer3.getPageY()+85); } } else { layer2.addChild(scrollobj); layer1.addChild(tblHdrLyr); layer3.addChild(tblFtrLyr); } } </script> |
- Re: [Dynapi-Help] Re: How to call 2 DynAPI scripts from tw... Joe NguyenLe
- Re: [Dynapi-Help] Re: How to call 2 DynAPI scripts fr... Richard Bennett
- Re: [Dynapi-Help] Re: How to call 2 DynAPI script... Joe NguyenLe
