New Window size and placement

G

gcc

I am using....

<a href="link.html" onclick="window.open(this.href, '',
'height=300,width=300');return false;">Open link.html.</a>

To bring up a small window for my form and it works great, but i was
wondering if there is a way to have that window postion itself right smack
dab in the middle of the screen.....
 
J

Jan Harders

gcc said:
<a href="link.html" onclick="window.open(this.href, '',
'height=300,width=300');return false;">Open link.html.</a>

To bring up a small window for my form and it works great, but i was
wondering if there is a way to have that window postion itself right
smack dab in the middle of the screen.....

well, read screen-height and width, calculate center-position for your
window-size and add top=XYZ,left=ZYX to the third parameter of window.open.

greets,

jan
 
W

Whitecrest

I am using....
<a href="link.html" onclick="window.open(this.href, '',
'height=300,width=300');return false;">Open link.html.</a>
To bring up a small window for my form and it works great, but i was
wondering if there is a way to have that window postion itself right smack
dab in the middle of the screen.....

Not reliably. Search google for screen resolution and javascript
 
D

David Dorward

gcc said:
To bring up a small window for my form and it works great, but i was
wondering if there is a way to have that window postion itself right smack
dab in the middle of the screen.....

Slap bang in the middle of the screen, for me and many others, is partially
on one monitor and partially on another. This is less then optimal.

I recommend you trust the window management capabilities of the user's
system (or not open a new window at all, one window is good).
 
S

Stan McCann

gcc said:
I am using....

<a href="link.html" onclick="window.open(this.href, '',
'height=300,width=300');return false;">Open link.html.</a>

To bring up a small window for my form and it works great, but i was
wondering if there is a way to have that window postion itself right smack
dab in the middle of the screen.....

So, you not only want to open a window on my computer but you want to
tell me where it must appear too? Please list the sites you do so I can
avoid them. I don't want a window opened.

--
Stan McCann
Webmaster/Computer Center Manager, NMSU at Alamogordo
Cooordinator, Tularosa Basin Chapter, ABATE of NM AMA#758681
'94 1500 Vulcan (now wrecked) :( http://surecann.com/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein
 
G

gcc

If I don't want my players leaving the page they are to take 3 seconds and
report I don't?
 
W

Whitecrest

If I don't want my players leaving the page they are to take 3 seconds and
report I don't?

Don't know, I have not seen the entire thing in the right context.
 
M

Mark Parnell

If I don't want my players leaving the page they are to take 3 seconds and
report I don't?

Get your form handler to return them to the page they came from, with an
additional message telling them that their results have been submitted.
 
G

GccTX

So, you not only want to open a window on my computer but you want to
tell me where it must appear too? Please list the sites you do so I can
avoid them. I don't want a window opened.

Uh No, Sorry you misunderstood or maybe I didn't explain properly..

This is a members only community and unless you are a member you would have
no reason to visit the pages.....

The Link for the new window is located in a forum thread, That thread has
the settings for the current event and the results from other events, This
forum has almost 800 Membes and has approx 100 - 150 new post a day,
Members want to report their results while still continuing to read new
post....therefore they simply have to click the link for the form, fill in
the 3 required fields and be on their way...... to be able to do both
without leaving the forums was suggested by them, and since there are enough
new post to read everyday I don't want to tie up a thread with each member
posted their results to that thread. A new window seems the only answer for
this....So keep in mind there are 3 issues here

1) Not leaving The Forum
2) Not to post results in a thread
3) Fast and simple reporting

If you know of a better way to do this and meet all 3 requirments by all
means please make a suggestion
 
D

David Dorward

GccTX said:
If you know of a better way to do this and meet all 3 requirments by all
means please make a suggestion

Let the user open a new window or tab using whatever means their browser
provides to do this IF THEY SO WANT. In my browser, this is just a case of
using the middle mouse button instead of the left one to click on the link.
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top