PDA

View Full Version : force browser to refreash after window resize



chriskq
06-25-2007, 04:46 AM
Hey all,

run into abit of a problem with a tricky design for a website im doing.

I am using javascript to position the footer block to the bottom of the browser window if content premits.

it might be easier if you see for yourself what is happening so here is a link:
http://www.massarcade.com/chris_testing/absolute_footer/

So it works on pageload (the footer block gets positioned absolute bottom:0 )

But when you resize the browser window, it gets stuffed up. But it fixes itself when you do a refresh in the adjusted browser window.

The JS / CSS and code is all in the one page
Would appreciate if anyone could help me with this, could even turn it into a dynamic drive script if people think its worthy.

Cheers

chriskq
06-25-2007, 05:16 AM
ah, the


onresize="location.href=location.href"

did the trick

jscheuer1
06-25-2007, 09:00 AM
For these sorts of things, you are much better off running the same code that you ran onload or as the page loaded than to reload the page onresize.