By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

resize window

P: n/a
Hi Folk

I use a pop-up window on www.wapitipark.co.nz to view images.

On some sites, I saw (a long time ago) a trick where they use Javascript to
resize the window to the size of the image.

Do you know how to do this?

TIA

Nicolaas
Jan 18 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
windandwaves wrote:
Hi Folk

I use a pop-up window on www.wapitipark.co.nz to view images.
Why?
On some sites, I saw (a long time ago) a trick where they use
Javascript to resize the window to the size of the image.

Do you know how to do this?


Yes, and I know why it is no longer a viable practice.

Richard.
Jan 18 '06 #2

P: n/a
Richard Cornford wrote:
windandwaves wrote:
Hi Folk

I use a pop-up window on www.wapitipark.co.nz to view images.


Why?


Just have a look at the site, it seems to be nice for the flow of the site.
On some sites, I saw (a long time ago) a trick where they use
Javascript to resize the window to the size of the image.

Do you know how to do this?


Yes, and I know why it is no longer a viable practice.


Why is it no longer a viable practice?

Jan 18 '06 #3

P: n/a
windandwaves wrote:
Richard Cornford wrote:
windandwaves wrote:
Hi Folk

I use a pop-up window on www.wapitipark.co.nz to view
images.


Why?


Just have a look at the site, it seems to be nice for
the flow of the site.


No. Wading through an arbitrary web site to see if my perception
experiences some vague notion of "nice for the flow" as being valid is
not a useful application of my time. If you cannot explain why you are
doing something in a clear written statement I will conclude that you do
not know yourself.
On some sites, I saw (a long time ago) a trick where they use
Javascript to resize the window to the size of the image.

Do you know how to do this?


Yes, and I know why it is no longer a viable practice.


Why is it no longer a viable practice?


Because in addition to the user having an absolute veto over the opening
of new windows (rendering any design predicated upon the successful
opening of new windows unreliable), they also now have an absolute veto
on the scripted re-sizing of any new windows that they allow to be
opened.

Richard.
Jan 22 '06 #4

P: n/a
"Richard Cornford" <Ri*****@litotes.demon.co.uk> writes:
windandwaves wrote:
Just have a look at the site, it seems to be nice for
the flow of the site.

.... If you cannot explain why you are
doing something in a clear written statement I will conclude that you do
not know yourself.


My interpretation, and correct me if I'm wrong, is that "nice for the
flow" means approx. the same as the usability slogan "principle of
least surprise" - what most users expect.

It might or might not be true.

If it's for an image gallery, I would prefer to open the image in the
same window, since that allows me to use my browser's intelligent
"next" feature to walk through the large images. Also, using the "back"
button is still more natural than closing windows.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jan 23 '06 #5

P: n/a
Lasse Reichstein Nielsen wrote :
"Richard Cornford" <Ri*****@litotes.demon.co.uk> writes:
windandwaves wrote:
Just have a look at the site, it seems to be nice for
the flow of the site.

...
If you cannot explain why you are
doing something in a clear written statement I will conclude that you do
not know yourself.


My interpretation, and correct me if I'm wrong, is that "nice for the
flow" means approx. the same as the usability slogan "principle of
least surprise" - what most users expect.


Hello Lasse :)

The caption/legend of the images should clearly indicate that clicking
on the images would create a secondary window with its enlarged image,
as recommended by WAI guidelines.

It might or might not be true.

I'd say it's not the case here.
If it's for an image gallery, I would prefer to open the image in the
same window,
Absolutely. Furthermore because each of the secondary window requests
the same window dimensions. So reusing, recycling the same secondary
window would be more user-friendly for the users' system resources.

since that allows me to use my browser's intelligent "next" feature to walk through the large images.
Yep. An prefetch feature too.

Also, using the "back" button is still more natural than closing windows.
/L


Yep.

Gérard
--
remove blah to email me
Jan 23 '06 #6

P: n/a
windandwaves wrote :
Hi Folk

I use a pop-up window on www.wapitipark.co.nz to view images.

On some sites, I saw (a long time ago) a trick where they use Javascript to
resize the window to the size of the image.


Most of what your markup and javascript code do on your page is pretty
wrong, definitely improvable.

- as coded, your links will not work if javascript support is disabled
or inexistent
- your thumbnails do not indicate that clicking on them will show an
enlarged image in a distinct window
- your alt attribute for the image is illogical. Alt attribute should
render textual replacement. So, "CLICK TO SEE A LARGER IMAGE" should not
be in the alt attribute value.
- <a href="#" is dysfunctional when javascript support is disabled or
inexistent
- your window.open call is making your enlarged page non-resizable: this
is not recommendable and not accessibility-wise
- your window.open call is explicitly removing scrollbars even if they
are needed, even if document box overflows requested window dimensions:
again, this is not recommendable and not accessibility-wise
- the windowName you choose in your window.open call should be the same
for a given target attribute otherwise you're creating a different
behavior for those with javascript support and for those without
javascript support

You should first start by addressing such issues before trying to
"resize" popup windows:

DOM:window.open
Best practices:
http://developer.mozilla.org/en/docs...Best_practices
Usability issues:
http://developer.mozilla.org/en/docs...ability_issues

Your webpage also suffers from many more simple but important problems,
I'd say, than from a non-resizable window via script. Some of them:
- table-based design
- duplication of title and alt attribute values: you do not seem to know
which one to use and for what purpose
- over-declaring duplicated keywords in meta tag will get you the
reverse of what you're trying to do. Just think for a min: if everyone
does what you do, then everyone will defeat the purpose+capabilities of
indexing robots. Over-listing keywords just achieves the reverse of the
original intent: indexing engines penalize such sites.
- over-declaring and over-defining the title attribute everywhere
etc,etc.

Your webpage should be as usable, worthy and friendly even if I am using
a text browser like Lynx 2.8.5 .

Gérard
--
remove blah to email me
Jan 24 '06 #7

P: n/a
Gérard Talbot wrote:
windandwaves wrote :
Hi Folk

I use a pop-up window on www.wapitipark.co.nz to view images.

On some sites, I saw (a long time ago) a trick where they use
Javascript to resize the window to the size of the image.


Most of what your markup and javascript code do on your page is pretty
wrong, definitely improvable.

- as coded, your links will not work if javascript support is disabled
or inexistent
- your thumbnails do not indicate that clicking on them will show an
enlarged image in a distinct window
- your alt attribute for the image is illogical. Alt attribute should
render textual replacement. So, "CLICK TO SEE A LARGER IMAGE" should
not be in the alt attribute value.
- <a href="#" is dysfunctional when javascript support is disabled or
inexistent
- your window.open call is making your enlarged page non-resizable:
this is not recommendable and not accessibility-wise
- your window.open call is explicitly removing scrollbars even if they
are needed, even if document box overflows requested window
dimensions: again, this is not recommendable and not
accessibility-wise - the windowName you choose in your window.open
call should be the same for a given target attribute otherwise you're
creating a different behavior for those with javascript support and
for those without javascript support

You should first start by addressing such issues before trying to
"resize" popup windows:

DOM:window.open
Best practices:
http://developer.mozilla.org/en/docs...Best_practices
Usability issues:
http://developer.mozilla.org/en/docs...ability_issues

Your webpage also suffers from many more simple but important
problems, I'd say, than from a non-resizable window via script. Some
of them: - table-based design
- duplication of title and alt attribute values: you do not seem to
know which one to use and for what purpose
- over-declaring duplicated keywords in meta tag will get you the
reverse of what you're trying to do. Just think for a min: if everyone
does what you do, then everyone will defeat the purpose+capabilities
of indexing robots. Over-listing keywords just achieves the reverse
of the original intent: indexing engines penalize such sites.
- over-declaring and over-defining the title attribute everywhere
etc,etc.

Your webpage should be as usable, worthy and friendly even if I am
using a text browser like Lynx 2.8.5 .

Gérard


Thanks for the feedback.... Will implement. Totally agree. I made this
site a long time ago and I have learned a lot since.
Jan 25 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.