View Single Post
Old 01-01-2013, 03:28 PM   PM User | #7
KScript
New to the CF scene

 
Join Date: Dec 2012
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
KScript is an unknown quantity at this point
Angry IE won't show up on this dom construction.

Did any one get chance to check below the code , quick revert is appreciated.

As posted earlier


Code below :
************
<html>
<title> test dom </title>
<head>
<script>
function call(){
alert("call made");
}
function pictureDiv(){
var mainTable = document.createElement("table");
var tbody = document.createElement("tbody");
var tr = document.createElement("tr");
var td = document.createElement("td");
td["valign"] = "bottom";
tr.appendChild(td);

var picDiv = document.createElement("div");
picDiv["id"] = "x";
picDiv.style.cssText = "width:180px";

var table = document.createElement("table");
table["border"] = "1";
table["valign"] = "bottom";
table["cellpadding"] = "0";
table["cellspacing"] = "0";
table.style.cssText = "padding-bottom:10";
picDiv.appendChild(table);

var tr1 = document.createElement("tr");
var td1 = document.createElement("td");
table.appendChild(tr1);
tr1.appendChild(td1);

var img = document.createElement("img");
img["id"] = "y";
img["src"] ="x.gif";

td1.appendChild(img);

var td2 = document.createElement("td");
td2["valign"] = "bottom";

tr1.appendChild(td2);

var resDiv = document.createElement("div");
resDiv["id"] = "resolutionwarning";
resDiv.style.cssText = "margin-left: 5px;";

td2.appendChild(resDiv);

var atag = document.createElement("a");
atag["href"] ="";
atag["onclick"] = "call()";

resDiv.appendChild(atag);

var resImg = document.createElement("img");
resImg["id"] = "z";
resImg["src"] = "y.gif";
resImg["width"] = "9";
resImg["height"] = "9";
resImg["border"] = "0";
resImg["align"] = "absbottom";
resImg["alt"] = " not recommended ";

atag.appendChild(resImg);

var tr2 = document.createElement("tr");
var td3 = document.createElement("td");

tr2.appendChild(td3);

var text = document.createTextNode('4x6');
td3.appendChild(text);

picDiv.appendChild(tr2);

td.appendChild(picDiv);
mainTable.appendChild(tbody);
tbody.appendChild(tr);

document.getElementById("previews").appendChild(mainTable);
}
</script>
</head>
<body onload = "pictureDiv()">
Test page....
<div id = "previews"></div>
</body>
</html>




*************
Thanks inAdvance.[/QUOTE]
KScript is offline   Reply With Quote