JS gevorderde |
|
oke, ik heb nu het volgende:
var overlayDIV = document.createElement("DIV");
overlayDIV.setAttribute("id","overlayDIV");
overlayDIV.setAttribute("style","background-color:#000;opacity:.7;filter:alpha(opacity=70);display:block;position:fixed;height:100%;width:100%;top:0px;left:0px;z-index:9999");
commandHeight = 250; // px
commandWidth = 500; // px
commandTop = Math.min((meaSureMentWindow('h') - commandHeight)/2)
commandLeft = Math.min((meaSureMentWindow('w') - commandWidth)/2)
var commandsDIV = document.createElement("DIV");
commandsDIV.setAttribute("id","userCommandsDIV");
commandsDIV.setAttribute("style","border:1px solid #000;background-color:#fff;opacity:.9;filter:alpha(opacity=90);display:block;position:fixed;height:" + commandHeight + "px;width:" + commandWidth + "px;top:" + commandTop + "px;left:" + commandLeft + "px;z-index:9998");
overlayDIV.appendChild(commandsDIV);
document.body.appendChild(overlayDIV);
var overlayDIV = document.createElement("DIV"); overlayDIV.setAttribute("id","overlayDIV"); overlayDIV.setAttribute("style","background-color:#000;opacity:.7;filter:alpha(opacity=70);display:block;position:fixed;height:100%;width:100%;top:0px;left:0px;z-index:9999"); commandHeight = 250; // px commandWidth = 500; // px commandTop = Math.min((meaSureMentWindow('h') - commandHeight)/2) commandLeft = Math.min((meaSureMentWindow('w') - commandWidth)/2) var commandsDIV = document.createElement("DIV"); commandsDIV.setAttribute("id","userCommandsDIV"); commandsDIV.setAttribute("style","border:1px solid #000;background-color:#fff;opacity:.9;filter:alpha(opacity=90);display:block;position:fixed;height:" + commandHeight + "px;width:" + commandWidth + "px;top:" + commandTop + "px;left:" + commandLeft + "px;z-index:9998"); overlayDIV.appendChild(commandsDIV); document.body.appendChild(overlayDIV);
Maar nu wil ik het HTML weergeven in de div d.m.v. javascript; hoe kan ik dit het beste doen |