homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Browsers / Opera Browser Usage and Support
Forum Library, Charter, Moderator: open

Opera Browser Usage and Support Forum

Opera and Resize Event
Forcing Opera to reload on resize

 3:42 am on Feb 4, 2002 (gmt 0)

Is it possible to get opera to reload when the window is resized?



 4:05 am on Feb 4, 2002 (gmt 0)



 4:20 am on Feb 4, 2002 (gmt 0)

Thanks Brett, I've been searching all night for this info. I'll just have to live with this minor shortcoming in Opera.


 4:31 am on Feb 4, 2002 (gmt 0)

Brett is referring to the resize event, not supported, however, you can roll your own. Set up a timer with this kind of stuff in JS.

window.onload = yourstartupstuff;

function yourstartupstuff() {

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 {


 4:52 am on Feb 4, 2002 (gmt 0)

awesome, thank you, it works perfectly.

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.


 5:19 am on Feb 4, 2002 (gmt 0)


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:

Maybe helpful.


 5:30 am on Feb 4, 2002 (gmt 0)

Thanks, I was searching with google but obviously with the wrong criteria.


 6:41 am on Feb 4, 2002 (gmt 0)

I believe that will work in SDI mode, but not in MDI mode.


 7:08 am on Feb 4, 2002 (gmt 0)

Brett, please excuse my ignorance, what is SDI mode and MDI mode?


 7:17 am on Feb 4, 2002 (gmt 0)

Actually, it only seems to work only once; in other words, after the first reload, the timer is turned off.

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...


 7:28 am on Feb 4, 2002 (gmt 0)

Well, the MDI in opera is a proprietary implimentation as far as I know. The whole windowing action is different from any other MDI program I've ever used. (If I recall correctly, you can return to standard MDI action with "classicMDI=1" in the [userprefs] section of the ini. I'm not sure if that is still supported in 6.0).

>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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Browsers / Opera Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved