maxelcat
05-11-2007, 09:12 PM
Dear All
I have been working on a design using javascript, css and html. Its not complex. I have a left and right column of 200px widths. I set a wrapper to 95% and then use some javascript to work out what the width of the middle column should be and set it.
It all works fine. I added a little bit of code into the body tag so that if the user resizes their browser then the page reloads. This works fine in Opera and FF. However, in IE7 it appears to get into some sort of loop.
ANy ideas please.
You can see the offending page at
www.maxelcat.co.uk/tests/test_index.html
I would really appreciate any help with this
thanks
Edward
here's what I have in the html
<body onResize="window.location.href = window.location.href;">
and here's the javascript (stripped down)
window.onload=liveWidth;
function liveWidth() {
var liveWidth = document.body.clientWidth;
var wrapperWidth=document.getElementById("wrapper").offsetWidth;
var centerWidth = wrapperWidth-(200+200+20+3);
document.getElementById("center_col").style.width=centerWidth+"px";
}
I have been working on a design using javascript, css and html. Its not complex. I have a left and right column of 200px widths. I set a wrapper to 95% and then use some javascript to work out what the width of the middle column should be and set it.
It all works fine. I added a little bit of code into the body tag so that if the user resizes their browser then the page reloads. This works fine in Opera and FF. However, in IE7 it appears to get into some sort of loop.
ANy ideas please.
You can see the offending page at
www.maxelcat.co.uk/tests/test_index.html
I would really appreciate any help with this
thanks
Edward
here's what I have in the html
<body onResize="window.location.href = window.location.href;">
and here's the javascript (stripped down)
window.onload=liveWidth;
function liveWidth() {
var liveWidth = document.body.clientWidth;
var wrapperWidth=document.getElementById("wrapper").offsetWidth;
var centerWidth = wrapperWidth-(200+200+20+3);
document.getElementById("center_col").style.width=centerWidth+"px";
}