473,414 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

resize window

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
7 2354
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
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
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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Charles Packer | last post by:
From one of the online Javascript tutorials, I learned how to open a new window and set its size. I'm building a page that has several small photographs, and I want to let the viewer examine...
10
by: Rob | last post by:
Hi, I have some problems resizing a html page when it is loaded. I want the page to resize to the screensize. The following snipped of code (see below) works perfect on my Windows NT. but not...
4
by: David Logan | last post by:
Hello, I am trying to open a window with a graphic in it and have the window be exactly the correct size of the image. Is there anyway to do this that will work on any browser on any OS???? ...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
3
by: Z D | last post by:
Hello, BACKGROUND: ============== I've created a Windows User Control that contains an Image Control (among other controls). The user control handles the picture resize event. Whenever the...
6
by: varois83 | last post by:
Hi Does it matter if a site built with CSS resize nicely or not? I see some very fluid that even with the browser window reduced to 30%, the site still looks the same, others do not resize at...
69
by: RC | last post by:
I know how to do this in JavaScript by window.open("newFile.html", "newTarget", "scrollbars=no,resizable=0,width=200,height=200"); The browser will open a new window size 200x200, not allow...
2
by: daveyand | last post by:
Hey Guys I am able to detect a window resize using the following code: window.onresize = function () { if(document.getElementById("parent_for_video").style.display != "none") {...
5
by: Doug Gunnoe | last post by:
I'm considering resizing a div onload to better match the screen width of the user. Easy enough, however it seems that I have read in this group that there are potential problems with this,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.