Solved

Does Mozilla allow moveTo(-4,-4)?

Posted on 2004-09-19
9
305 Views
Last Modified: 2006-11-17
Hi Experts

Is it my imagination or does Mozilla/Firefox not allow you to move a window to negative screen coordinates? E.g. moveTo(-4,-4). It seems to just treat all negative numbers as 0.

IE handles this fine, and it is necessary if you want simulate a truly maximized window in JS (that is, one that does not have the 4-pixel left-hand application margins that IE will otherwise only remove when you click the Maximization button).

Thanks
0
Comment
Question by:metalaureate
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 13

Accepted Solution

by:
cLFlaVA earned 500 total points
Comment Utility
Take a look at http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/moveto.asp.

The x and y coordinates must be greater than or equal to 0.  The negatives most likely work in IE because of numerous security flaws.  Otherwise, I could potentially open endless amounts of browser windows where the user wouldn't even be able to see them.
0
 

Author Comment

by:metalaureate
Comment Utility
Damn! You have a point!

Do you know of any way of getting a true maxmized window? One that gives up the space devoted to the application window's left-hand frame? (toggle between true Maximized and back again to see for yourself if I'm not being clear)
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
Mozilla, to its credit resist many attempts to take control over preferences and window configuration.  In fact there is a user preference that the user can selct to prevent script from chnging the window size or position.  So even if you come up with script to do it the user will override it if they want, and I think the default is to not allow it.

If the trend of Mozilla gaining market share monthly continues we are going to have to deal with a browser that protects user control the way they should always have been protected.

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
Oops forgot to post a possible work around.  Try negative margins for the body tag.

<body style="margin:-4 0 0 -4">

Negative margins are legal and standards compliant so you might get around it that way but suspect it wil just clip the content.

Cd&
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Expert Comment

by:cLFlaVA
Comment Utility
Cd&-

Wouldn't that just set the content of the page back 4 pixels, rather than remove that thin line that borders the application?  When a window is not maximized, there is that frame around the app, and when it's maximized, the frame cannot be seen.  I think that's what metalaureate is attempting to do...
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
Yeah tha's why I said I thin it will just clip the content.  The margin should not be able to change the window but we might discover a bug ... er.... undocuemnted feature.

Cd&
0
 
LVL 36

Expert Comment

by:Zyloch
Comment Utility
It's one of the reasons why we love Mozilla, heh. Of course, you do it simply in IE by opening another window with window.open and fullscreen=yes, but that's IE, sigh...
0
 

Author Comment

by:metalaureate
Comment Utility
Ok, so it is not really possible. BTW, I am only trying maximize a secondary window launched at the user's initiation, and only for 800x600 screens.

Thanks to you both.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
Yeah even off of an open it still won't let you push the chrome outside like IE does.

Cd&
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now