resize window

W

windandwaves

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
 
R

Richard Cornford

windandwaves said:
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.
 
R

Richard Cornford

windandwaves said:
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.
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.
 
L

Lasse Reichstein Nielsen

Richard Cornford said:
....
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
 
G

Gérard Talbot

Lasse Reichstein Nielsen wrote :
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
 
G

Gérard Talbot

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/DOM:window.open#Best_practices
Usability issues:
http://developer.mozilla.org/en/docs/DOM:window.open#Usability_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
 
W

windandwaves

Gérard Talbot said:
windandwaves wrote :

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/DOM:window.open#Best_practices
Usability issues:
http://developer.mozilla.org/en/docs/DOM:window.open#Usability_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.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top