<script type="text/javascript">
function findPos() {
var obj = document.getElementById("detContFacRight");
var objBottom = document.getElementById("detContFacRight").offsetHeight;
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent)
}
curBot = curtop + objBottom;
//return [curleft,curtop];
alert('location of the Left of the DIV: ' + curleft);
alert('location of the Top of the DIV: ' + curtop);
alert('location of the Bottom of the DIV: ' + curBot);
}
window.onload = function()
{
findPos()
}
//-->
</script>
ASKER
ASKER
<script type="text/javascript">
function findPos()
{
var getDivs = document.getElementsByTagName("div");
var divsLeft = new Array();
for (var i=0; i < getDivs.length; i++) {
if (getDivs[i].className == "pfProText") {
var curtop = 0;
var obj = getDivs[i];
do {
curtop += obj.offsetTop;
} while (obj = obj.offsetParent)
divsLeft.push([getDivs[i], curtop]);
//alert("Found " + getDivs[i]);
}
}
var obj = document.getElementById("detContFacRight");
var objBottom = document.getElementById("detContFacRight").offsetHeight;
var curtop = 0;
if (obj.offsetParent) {
do {
curtop += obj.offsetTop;
} while (obj = obj.offsetParent)
}
curBot = curtop + objBottom;
//alert('location of the Top of the Right DIV: ' + curtop);
//alert('location of the Bottom of Right DIV: ' + curBot);
var foundPos = false;
for (var j=0; j < divsLeft.length; j++) {
if (foundPos || (divsLeft[j][1] > curBot)) {
foundPos = true;
divsLeft[j][0].style.width = "100%";
} else {
divsLeft[j][0].style.width = "48%";
}
}
}
window.onload = function()
{
findPos();
}
//-->
</script>
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
ASKER
MultiArray = new Array(7);
MultiArray [0] = new Array(2);
MultiArray [0][0] =
MultiArray [0][1] =
Hopes this helps,
Brad