In the following code I want to clear the contents of the allready existed
divMenu and insert some other elements (buttons)
a) Is it correct to clear the contents of the divMenu with:
dlrMenu.setHTML('') // Clear prev content
b) The buBooks button does NOT show up, but the buTest button DOES shows
up!!! With the debuger i notice that the "created" property of the dlrMenu
is FALSE! and does NOT call the createElement method in:
object.js
=========
...
if (this.created) child.createElement()
...
Can you tell me what I am doing wrong?
Thanks
Andreas Gortsilas
==========================================================================
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1253">
<title>Layer Replace Contents Example</title>
<script language="Javascript1.1" src="/SrcDC/_Gen/dynapi.js"></script>
<script language="Javascript1.1">
<!--
DynAPI.setLibraryPath('/SrcDC/_Gen/')
DynAPI.include('dynacore.api.*')
DynAPI.include('dynacore.ext.inline')
DynAPI.include('dynaetc.ccreationExt.layerpos')
DynAPI.include('dynacore.ui.label')
DynAPI.include('dynacore.ui.style')
DynAPI.include('dynacore.ui.button')
var dlrMenu, oNav;
DynAPI.onLoad=function() {
oNav = DynAPI.document
oNav.elements["divLang"].setBgColor('#c0c0c0')
oNav.elements["divLang"].positionInParent('bottomleft', 0, 0)
dlrMenu = oNav.elements["divMenu"];
dlrMenu.setSize(200, 200);
dlrMenu.moveTo(5,100)
dlrMenu.setBgColor('#c0c0c0')
dlrMenu.setHTML('') // Clear prev content
oElm = new
Button('buBooks',5,5,dlrMenu.getWidth(),20,'<center><b>Books<\/b><\/center>'
,true)
dlrMenu.addChild(oElm)
alert(oElm)
oElm = new
Button('buTest',5,25,dlrMenu.getWidth(),20,'<center><b>test<\/b><\/center>',
true)
DynAPI.document.addChild(oElm)
alert(oElm)
}
//-->
</script>
<script language="Javascript">
<!--
function DoOnChangeLang(){
parent.location.href =
"Frames_Main_"+document.frmLang.selLang.options[document.frmLang.selLang.sel
ectedIndex].value+".htm";
}
//-->
</script>
</head>
<body>
<div id="divMenu" name="divMenu" STYLE="position: absolute">
<b>Menu</b>
<p>
<a href="Books.htm">Books</a><br>
<a href="Magazines.htm">Magazines</a><br>
<a href="Scripts.htm">Scripts (Examples)</a>
</p>
</div>
<div id="divLang" name="divLang" STYLE="position: absolute">
<form id="frmLang" name="frmLang">
<p>Language:<select id="selLang" name="selLang"
onchange="DoOnChangeLang()"><option value="Gr">Greek<option value="En"
selected>English</select></p>
</form>
</div>
</body>
</html>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help