This is working in Firefox and Chrome and appears to be doing absolutely nothing in any version of IE. I assume this is common but I'm not finding an answer on google or the forums.
Thanks for the look
Javascript after </html> tag:
<script type="text/Javascript">
function load1() {
imageLoaded();
document.getElementById("confImage").style.display = "block";
}
function imageLoaded() {
var iW = document.getElementById("confImage").width;
var iH = document.getElementById("confImage").height;
changeImageSize(iW, iH);
}
function changeImageSize(iW, iH) {
if (iW > 460 || iH > 460) {
// reset dimension of image to fit in div
var multiply = 0;
if (460 / iW < 460 / iH) {
multiply = myFloor(460 / iW, 3);
} else {
multiply = myFloor(460 / iH, 3);
}
document.getElementById("confImage").width = multiply * iW;
document.getElementById("confImage").height = multiply * iH;
}
}
function myFloor(n, pos) {
n = "" + n;
if (n.length < n.indexOf('.') + pos + 1) {
return parseInt(n);
} else {
return n.substr(0, n.indexOf('.') + pos);
}
}
</script>
This post has been edited by eTech1: 19 October 2010 - 09:50 AM

New Topic/Question
Reply



MultiQuote





|