Window resizing and moving (JavaScript) in Opera 7.x

Jeex
Jeex used Ask the Experts™
on
Hi,

Does anyone know how to move and/or resize a window in Opera 7.x using JavaScript?

I tried the following code, but it only appears to modify windows inside Opera's workspace, i.e. not relative to the desktop...

<html>
      <head>
            <title>Test</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <script type="text/javascript">
                  function doIt()
                  {
                        parent.window.resizeTo(1024, 768);
                        parent.window.moveTo(0, 0);
                        //window.location.href = "http://www.google.com/";
                  }
            </script>
      </head>
      <body onload="doIt();">
            <p>Text...</p>
      </body>
</html>

The code works fine in Mozilla and IE, and apparently even in Opera 6.x, just not Opera 7.x. Any ideas?

Cheers,

-- Jeex
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Check to see if JS is enabled in Opera, because from when I've used Opera in the past, it has been disabled.  Exactly how to do this, I don't know...
Hmmm. I've got a manual way of doing it. Hope it helps!

<script>
  function full_screen(){
  window.moveTo(0,0)
  window.resizeTo(screen.width,screen.height)
  }
</script>

<form>
<input type="button" onClick="full_screen()" value="Full Screen!">
</form>

good luck!

da_smart1
Asta CuTechnical consultant & graphic design
Top Expert 2004

Commented:
Jeex,
No comment has been added lately (62 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: split points between Laptop765 http:#9257162 and da_smart1 http:#9945586

Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --


Thanks,
astaec
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial