Changing location of a window

J

Jonathan N. Little

fulio said:
Hello,

My question is in the following web page:

http://www.pinyinology.com/diaoHao2a/group/box.html

Thanks for your help..

"When clicking the 'left', a window will appear at the left-hand upper
corner. When clicking the 'right', a window will appear at the
right-hand upper corner."

Of what? Positioning of windows via JavaScript is disabled on my browser
by default and other modern browsers. It was an abused security risk in
the past.
 
F

fulio pen

"When clicking the 'left', a window will appear at the left-hand upper
corner. When clicking the 'right', a window will appear at the
right-hand upper corner."

Of what? Positioning of windows via JavaScript is disabled on my browser
by default and other modern browsers. It was an abused security risk in
the past.

It should have been 'left/right corner of the main window'. Wording
has been changed for clarity. Please see it again:

http://www.pinyinology.com/diaoHao2a/group/box.html

Thanks for response.

fulio pen
 
B

Beauregard T. Shagnasty

fulio said:
It should have been 'left/right corner of the main window'. Wording has
been changed for clarity. Please see it again:

http://www.pinyinology.com/diaoHao2a/group/box.html

They don't appear in the main window. They appear outside the browser
window, on the desktop.

You have JavaScript on the page, that opens each of these windows, but
you do not specify any *location* for either of them. On my computer,
they default to the upper right corner of the desktop, on my 22"
1680x1050 monitor - regardless of where or what size the browser window
is. (My browser is 900px wide, on the right side of the monitor.)

How to position a window:
http://www.pageresource.com/jscript/jwinopen.htm
http://javascript.about.com/library/blpopup5.htm
and even in the center of the screen:
http://www.nigraphic.com/blog/java-script/how-open-new-window-popup-
center-screen
 
I

idle

It should have been 'left/right corner of the main window'. Wording
has been changed for clarity. Please see it again:

http://www.pinyinology.com/diaoHao2a/group/box.html

Thanks for response.

fulio pen

Not sure if you can do right but add the left='value', top='value to
each and you'll get a better idea.



function newWindow2() {
var catWindow = window.open('notes.html',
'catwin','left=20,top=20, width=640, height=400,
scrollbars=no');
catWindow.focus();}


function newWindow4() {
var catWindow = window.open('zhw.html',
'catwin','left=600,top=20, width=600, height=400,
scrollbars=yes');
catWindow.focus();

YMMV
 
F

fulio pen

Not sure if you can do right but add the left='value', top='value to
each and you'll get a better idea.

function newWindow2() {
 var catWindow = window.open('notes.html',
'catwin','left=20,top=20, width=640, height=400,
scrollbars=no');
catWindow.focus();}

function newWindow4() {
var catWindow = window.open('zhw.html',
'catwin','left=600,top=20, width=600, height=400,
scrollbars=yes');
catWindow.focus();

YMMV

I will test them, and hope they will work. Thanks a lot for your help.

fulio pen
 
F

fulio pen

Not sure if you can do right but add the left='value', top='value to
each and you'll get a better idea.

function newWindow2() {
 var catWindow = window.open('notes.html',
'catwin','left=20,top=20, width=640, height=400,
scrollbars=no');
catWindow.focus();}

function newWindow4() {
var catWindow = window.open('zhw.html',
'catwin','left=600,top=20, width=600, height=400,
scrollbars=yes');
catWindow.focus();

YMMV

Hi,

Adding top and left values works. Please open the following page and
click each word:

http://www.pinyinology.com/diaoHao2a/group/box2a.html

Thanks for your help.

fulio pen
 
B

Beauregard T. Shagnasty

Hi, dorayme, would you try again:
http://www.pinyinology.com/diaoHao2a/group/box2a.html

The displays are good on my computer, the left is on the left, and right
on the right. I may have to test on more computers. Thanks.

For me, the left is left, and the right is left-of-center. You are not
considering sizes of monitors...

http://tekrider.net/usenet/boxes2a.jpg

Further, if the left window is allowed to remain open, then "right" is
clicked, the right window just refills the left window, instead of
opening its own window.

You need to figure out some way to tell the JavaScript to open the right
window 600px from the right edge of screen, no matter how wide it is.
 
R

Ray_Net

Hi, dorayme, would you try again:

http://www.pinyinology.com/diaoHao2a/group/box2a.html

The displays are good on my computer, the left is on the left, and
right on the right. I may have to test on more computers. Thanks.
If i click left first, the left click or the right click goes together
on the first window opened outside of the parent window.
If i click rigth first, the left click or the right click goes together
on the first window opened near the middle of the parent window.

In other words - doesnot work at all.

BUT, please let people position their windows where they want - do NOT
impose what you dream.
 
D

dorayme

<[email protected]
fulio pen said:
Hi, dorayme, would you try again:

http://www.pinyinology.com/diaoHao2a/group/box2a.html

The displays are good on my computer, the left is on the left, and
right on the right. I may have to test on more computers. Thanks.

Unfortunately much the same as before.

I notice also that if you click the left or right and then click
the right or left, both windows open left or right or right or
left, respectively, one replacing the other wherever it is.
 
D

dorayme

Ray_Net said:
BUT, please let people position their windows where they want - do NOT
impose what you dream.

Well, maybe, maybe not. I know for a fact that many people have
appreciated a product of mine called Scary Window. It is a sort
of holographic manic looking cat. On click, it comes right out of
the monitor and roams about the house, a sort of mouse control
facility for in the dead of night when the human occupants are
asleep or when on holidays.

In development, 47% of the mice that saw it died of fright,
nearly all the rest scarpered as far away from the test house as
they could.

There *were* a few mice that learnt to resist it,OK. But these
were handled by a clever little development of the product, a cat
that sounded off frighteningly, a variety of wav files being
employed. The neat thing about the sound is how it seems to come
from wherever the pop away window is.
 
J

Jonathan N. Little

dorayme said:
Well, maybe, maybe not. I know for a fact that many people have
appreciated a product of mine called Scary Window

I thought that was Microsoft's, oops no, that's Window*s* 8!
 

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,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top