Forum Moderators: open
window.onload = yourstartupstuff;
function yourstartupstuff() {
checkresize();
}
var origW=window.innerWidth;
var origH=window.innerHeight;
var chkresizetimer;
function checkresize() {
var newW=window.innerWidth;
var newH=window.innerHeight;
if (newW==origW && newH==origH){
chkresizetimer = setTimeout("checkresize()",200);
}
else {
clearTimeout(chkresizetimer);
window.location.reload();
}
}
I'm curious as to how this is browser specific? If I take onResize="history.go(0)" out of the body tag the script works for NN 6 and NN 4.74 but not for IE 6.
I'm not complaining, the script and body tag work perfectly in the browsers I have including Opera 6, just curious.
for IE.
instead of the innerHeight innerWidth stuff. Or just leave the onResize in your body tag. I could be wrong but I think only IE supports it?
I found this site on google:
[xs4all.nl...]
Maybe helpful.
I double checked it. I was testing in opera 5.12, and sure enough, it works. But if you do it again, (resize), it stops working. It's as if the timer stopped working or something or needs to be reset in a different manner.
As far as version 6, I really don't think MDI, SDI has anything to do with it. In windows, a window is a window. Where its placed is based upon its parent. (Brett, we had this discussion once before-popup windows just need one bit set in WIN32 to keep them from being resized - I'll stand by that, no matter what opera software tells you) MDI and SDI just refer to the number of documents and the parent window and who owns it. What happens to that window is just a function of the code inside. If SDI and MDI don't act the same with windowing functions as far as resizing, etc., then that's a bug. But I can't verify whether or not that code works or not for op6 because I can't tell whether it is reloading here or just checking its cache on my test page.
The only reason I have used the opera resize code is because of problems with a resize in 5.12 using CSS (just like NN4). I haven't really tested v6 enough yet. But in 5.12, there's really no problem on the first resize: but it seems like the second one never happens. And it looks to me like the timer code being reset turns the whole function off.
I'll test it some more...
>SDI mode and MDI mode?
Single Document Interface. Mono windows like IE where every new window spawns new toolbars, menus, and places a button on the windows task bar.
Multi Document Interface. Where there is only one main window with "unlimited" child windows.
When you start Opera you are given the option as to which one you want to use. In Operas SDI mode there are also "tabs" where you can load pages into "tabs".
Popups act differently in Opera depending on whether you are in sdi or mdi mode. You can force 'no resize' in sdi, but not in Opera's native mdi mode.