
September 21st, 2003, 12:31 AM
|
|
Junior Member
|
|
Join Date: Sep 2003
Location: Toronto
Posts: 12
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
I've played with the code and got it to work. I'll post it incase its a help to someone else:
PHP Code:
<script>
function foo()
{
var x = 30
var y = 20
var w = 500
var h = 375
var newDiv = document.createElement("div");
//
newDiv.setAttribute("id","oDiv");
newDiv.style.textAlign="center";
newDiv.style.position="absolute";
newDiv.style.top="20px";
newDiv.style.left="30px";
newDiv.setAttribute("style", "width:50%; text-align:center; position:absolute; top:20px; left:30px;");
document.body.appendChild(newDiv);
//
newObj = document.createElement("embed","wmode");
newObj.setAttribute("src","testTBG.swf");
newObj.setAttribute("width",w);
newObj.setAttribute("height",h);
newObj.setAttribute("wmode", "transparent");
newDiv.appendChild(newObj);
}
</script>
|