Browser window resize question

D

Dennis M

Hi guys, I'm trying to write a simple window resize script for my (older
version Mozilla for Mac) browser to use when it first launches to get the
window to the exact size and location I want it.

Is there any way I could modify this script.......


<script language="JavaScript">
<!--
function move_2_631_435()
{
self.moveTo(0,0)
self.resizeTo(631,435)
}
-->
</script>

<a href="javascript:move_2_631_435();">Resize Screen</a>


......to get my browser window to move to the left about 3 pixels more and
also get it to move upwards about 3 pixels more? Even though it says
"self.moveTo(0,0)" it's still about 5 pixels from the left side of the
window and 5 pixels from the bottom of the menu bar.

I tried putting negative values in the "(0,0)," but evidently that isn't
supported.

Thanks in advance for any help.
 
T

Thomas 'PointedEars' Lahn

Dennis said:
Hi guys, I'm trying to write a simple window resize script for my (older
version Mozilla for Mac) browser to use when it first launches to get the
window to the exact size and location I want it.

Is there any way I could modify this script.......


<script language="JavaScript">

Invalid (HTML4) markup. The `language' attribute is deprecated, the
`type' attribute is required:


Obsolete nonsense.
function move_2_631_435()
{
self.moveTo(0,0)
self.resizeTo(631,435)

Those statements should be ended with a semicolon each.

This is a syntax error. `--' is the decrement operator and expects a
reference as operand. Remove that line, it is not necessary.
</script>

<a href="javascript:move_2_631_435();">Resize Screen</a>


.....to get my browser window to move to the left about 3 pixels more and
also get it to move upwards about 3 pixels more? Even though it says
"self.moveTo(0,0)" it's still about 5 pixels from the left side of the
window and 5 pixels from the bottom of the menu bar.

window.moveTo() (self, which is window.self, which is window, is nonsense)
positions the window absolutely. You are looking for window.moveBy().
Maybe you will have to enable that feature in your preferences first, with
the side effect that Web sites are allowed to cripple your environment this
way, too, unless you disable script support completely.

I tried putting negative values in the "(0,0)," but evidently that isn't
supported.

Security restrictions do not allow to position the window outside of the
desktop.

<URL:http://www.mozilla.org/projects/security/components/signed-scripts.html#privs-list>


PointedEars
 
D

Dennis M

Thomas 'PointedEars' Lahn said:
Invalid (HTML4) markup. The `language' attribute is deprecated, the
`type' attribute is required:



Obsolete nonsense.


Those statements should be ended with a semicolon each.


This is a syntax error. `--' is the decrement operator and expects a
reference as operand. Remove that line, it is not necessary.


window.moveTo() (self, which is window.self, which is window, is nonsense)
positions the window absolutely.

That's what I want to do -- position the window absolutely when I first
launch the browser or when I make a new window from Mozilla's menu bar.

All I want to do is have about 2 pixels of space between the left, right,
top and bottom of the browser window and my screen. The script I posted
does fine for the right side and bottom, but I needed to adjust the left
and top sides by about 3 pixels each.

This script isn't going in a live website or anything, so I don't give a
crap about "syntax errors" and a lot of the other anal-retentive stuff you
mentioned as long as it gets the job done. I tried all those modifications
you suggested and it didn't resize the screen at all -- what I already had
works better than that.
 
T

Thomas 'PointedEars' Lahn

Dennis said:
This script isn't going in a live website or anything, so I don't give a
crap about "syntax errors" and a lot of the other anal-retentive stuff you
mentioned [...]
[top post]

*PLONK*
 
D

Dennis M

Thomas 'PointedEars' Lahn said:
Dennis said:
This script isn't going in a live website or anything, so I don't give a
crap about "syntax errors" and a lot of the other anal-retentive stuff you
mentioned [...]
[top post]

*PLONK*

Fine with me pal, I didn't like your attitude anyway.
 
H

Hywel Jenkins

Dennis said:
This script isn't going in a live website or anything, so I don't give a
crap about "syntax errors" and a lot of the other anal-retentive stuff you
mentioned [...]
[top post]

*PLONK*

Well, he did have a point.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top