Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Image window

Reply
Thread Tools

Image window

 
 
Darrell
Guest
Posts: n/a
 
      12-01-2003
I want to have a page that has a lot of thumb nails. I want to be able to
click on a thumb nail and have it open in a window but I don't want a new
window opening every time I click a thumb nail unless the first window
closes it self. In other words I don't want a bunch of windows open.
Is this possible?

--
Darrell


 
Reply With Quote
 
 
 
 
m
Guest
Posts: n/a
 
      12-01-2003
Darrell wrote:

> I want to have a page that has a lot of thumb nails. I want to be able to
> click on a thumb nail and have it open in a window but I don't want a new
> window opening every time I click a thumb nail unless the first window
> closes it self. In other words I don't want a bunch of windows open.
> Is this possible?
>


Yes. Don't open a new win in the first place.
It causes accessibility problems.
--
Cheers, m -- http://www.mbstevens.com/howtothumb/
 
Reply With Quote
 
 
 
 
Vic Sowers
Guest
Posts: n/a
 
      12-01-2003

"Darrell" <(E-Mail Removed)> wrote in message
news:B8Pyb.23243$(E-Mail Removed) hlink.net...
> I want to have a page that has a lot of thumb nails. I want to be able to
> click on a thumb nail and have it open in a window but I don't want a new
> window opening every time I click a thumb nail unless the first window
> closes it self. In other words I don't want a bunch of windows open.
> Is this possible?
>
> --
> Darrell
>
>


Yes. you will need language like this:
==========================
<script language="JavaScript">
var popup=null;
function closePopUp() {
if (popup && !popup.closed) popup.close();
}
function popUp(url) {
url = String(url.href);
if (popup && !popup.closed) popup.open(url,"_self");
else popup = window.open(url,"_blank",<params>);
}
window.onunload = closePopUp;
</script>

<a onclick="popUp(this); return false;" href="FullImage_1.htm">
<img src="Thumbnail_1.gif">
</a>
<a onclick="popUp(this); return false;" href="FullImage_2.htm">
<img src="Thumbnail_2.gif">
</a>
<etc...>
==========================

<params> may be found (for IE) at:

http://msdn.microsoft.com/workshop/a...ods/open_0.asp


 
Reply With Quote
 
Michael Wilcox
Guest
Posts: n/a
 
      12-01-2003
Darrell <(E-Mail Removed)> wrote:
> In other words I don't want a bunch of windows open.
> Is this possible?


You could start by not opening them in the first place. Just link each
thumbnail to the full-size image and the user will figure out the rest.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com


 
Reply With Quote
 
jake
Guest
Posts: n/a
 
      12-02-2003
In message <bgPyb.23842$(E-Mail Removed) .net>, m
<(E-Mail Removed)> writes
>Darrell wrote:
>
>> I want to have a page that has a lot of thumb nails. I want to be able to
>> click on a thumb nail and have it open in a window but I don't want a new
>> window opening every time I click a thumb nail unless the first window
>> closes it self. In other words I don't want a bunch of windows open.
>> Is this possible?
>>

>
>Yes. Don't open a new win in the first place.
>It causes accessibility problems.


In what way?

--
Jake
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      12-02-2003
[crossposted groups not on my server snipped]
"Vic Sowers" <(E-Mail Removed)> wrote in message
news:3fcbc6ec$0$184$(E-Mail Removed)-pc.org...
>
> "Darrell" <(E-Mail Removed)> wrote in message
> news:B8Pyb.23243$(E-Mail Removed) hlink.net...
> > I want to have a page that has a lot of thumb nails. I want to be able

to
> > click on a thumb nail and have it open in a window but I don't want a

new
> > window opening every time I click a thumb nail unless the first window
> > closes it self. In other words I don't want a bunch of windows open.
> > Is this possible?

>
> Yes. you will need language like this:
> ==========================
> <script language="JavaScript">
> var popup=null;
> function closePopUp() {
> if (popup && !popup.closed) popup.close();
> }
> function popUp(url) {
> url = String(url.href);
> if (popup && !popup.closed) popup.open(url,"_self");
> else popup = window.open(url,"_blank",<params>);
> }
> window.onunload = closePopUp;
> </script>
>
> <a onclick="popUp(this); return false;" href="FullImage_1.htm">
> <img src="Thumbnail_1.gif">
> </a>
> <a onclick="popUp(this); return false;" href="FullImage_2.htm">
> <img src="Thumbnail_2.gif">
> </a>
> <etc...>


What?

If the OP *really* wants to open the images in the same new window surely
<a href="whatever" target="same">...
is enough

Cheers
Richard.


 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      12-02-2003
rf wrote:

> [crossposted groups not on my server snipped]
> "Vic Sowers" <(E-Mail Removed)> wrote in message
> news:3fcbc6ec$0$184$(E-Mail Removed)-pc.org...
>
>>"Darrell" <(E-Mail Removed)> wrote in message
>>news:B8Pyb.23243$(E-Mail Removed) rthlink.net...
>>
>>>I want to have a page that has a lot of thumb nails. I want to be able

>
> to
>
>>>click on a thumb nail and have it open in a window but I don't want a

>
> new
>
>>>window opening every time I click a thumb nail unless the first window
>>>closes it self. In other words I don't want a bunch of windows open.
>>>Is this possible?

>>
>>Yes. you will need language like this:
>>==========================
>><script language="JavaScript">
>> var popup=null;
>> function closePopUp() {
>> if (popup && !popup.closed) popup.close();
>> }
>> function popUp(url) {
>> url = String(url.href);
>> if (popup && !popup.closed) popup.open(url,"_self");
>> else popup = window.open(url,"_blank",<params>);
>> }
>> window.onunload = closePopUp;
>> </script>
>>
>><a onclick="popUp(this); return false;" href="FullImage_1.htm">
>> <img src="Thumbnail_1.gif">
>> </a>
>><a onclick="popUp(this); return false;" href="FullImage_2.htm">
>> <img src="Thumbnail_2.gif">
>> </a>
>> <etc...>

>
>
> What?
>
> If the OP *really* wants to open the images in the same new window surely
> <a href="whatever" target="same">...
> is enough
>
> Cheers
> Richard.
>
>


Enlarged images usually have different sizes. If you're going to create
a single separate and unique window for all these enlarged images, then
I think you should adjust the window dimensions to the enlarged images'
dimensions. You can not do that with HTML only; you need javascript.

Also, you have the focus problem/burden with re-using the same popup due
to current os windowing management systems: when you click on the
opener's link to load another enlarged image into the popup, the opener
gets the focus and the popup gets behind. This problem can be corrected,
compensated with javascript (focus()).

DU

 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      12-02-2003
Vic Sowers wrote:
> "Darrell" <(E-Mail Removed)> wrote in message
> news:B8Pyb.23243$(E-Mail Removed) hlink.net...
>
>>I want to have a page that has a lot of thumb nails. I want to be able to
>>click on a thumb nail and have it open in a window but I don't want a new
>>window opening every time I click a thumb nail unless the first window
>>closes it self. In other words I don't want a bunch of windows open.
>>Is this possible?
>>
>>--
>>Darrell
>>
>>

>
>
> Yes. you will need language like this:
> ==========================
> <script language="JavaScript">


Type has superseded language and is both backward and
forward-compatible. So,

<script type="text/javascript">

> var popup=null;
> function closePopUp() {
> if (popup && !popup.closed) popup.close();
> }
> function popUp(url) {
> url = String(url.href);
> if (popup && !popup.closed) popup.open(url,"_self");
> else popup = window.open(url,"_blank",<params>);


There are a few issues here.
First off, I wonder why you load an html file into a popup instead of
just the enlarged image.gif. It's faster to load just a .gif instead of
a full document.
Second, ennlarged images usually do not have the same dimensions. So
loading FullImage_2.htm into the dimensions of the popup when
FullImage_1.htm was created and opened will not make sense.
Third, if the popup just lost focus and the user clicks on the thumbnail
link again in the opener, then the popup will be reloaded when just
bringing it in front would be more efficient. To avoid this, you need to
compare the url.href value with a global variable storing the last
loaded enlarged image href value.


> }
> window.onunload = closePopUp;
> </script>
>
> <a onclick="popUp(this); return false;" href="FullImage_1.htm">
> <img src="Thumbnail_1.gif">
> </a>


Fourth, if javascript is disabled, the enlarged image won't be loaded in
a popup but rather in the same window. That's fine and acceptable with
me. I just thought the OP would want to open it in a secondary window as
well. If that's the case, then

<a onclick="popUp(this); return false;" href="FullImage_1.htm"
target="EnlargedImagePopup" title="Clicking this thumbnail will bring an
enlarged image in a separate window (requested popup)">
<img src="Thumbnail_1.gif">
</a>

An example of how all this could be:
http://www10.brinkster.com/doctorunc...Thumbnail.html

DU

 
Reply With Quote
 
Andrew Murray
Guest
Posts: n/a
 
      12-06-2003

"Darrell" <(E-Mail Removed)> wrote in message
news:B8Pyb.23243$(E-Mail Removed) hlink.net...
> I want to have a page that has a lot of thumb nails. I want to be able to
> click on a thumb nail and have it open in a window but I don't want a new
> window opening every time I click a thumb nail unless the first window
> closes it self. In other words I don't want a bunch of windows open.
> Is this possible?
>
> --
> Darrell
>
> Yes, you can have a pop-up window or whatever to display the image, which using

javascript could probably close after a certain time has elapsed - or provide a
"close" link on the open page displaying the image(s).

<a href="#" onclick="window.close();">Close window</a>

the above HTML code will put a link on the page and will close down the open
window.


 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      12-06-2003
Andrew Murray wrote:
> javascript could probably close after a certain time has elapsed - or provide a
> "close" link on the open page displaying the image(s).
>
> <a href="#" onclick="window.close();">Close window</a>
>
> the above HTML code will put a link on the page and will close down the open
> window.


Is my "X" button broken?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
After 1.0.1 patch, <window id="main window" is all I see ion Firefox 4 03-13-2005 08:15 PM
window to window communication (window.opener) Andrew Bewley via DotNetMonster.com ASP .Net 0 02-03-2005 12:59 PM
wx.Image: Couldn't add an image to the image list. Laszlo Zsolt Nagy Python 1 01-26-2005 09:55 PM
Preview Image in the Image Adjustment Window (DiMAGE Scan Elite 5400) Steffen Digital Photography 2 05-06-2004 05:31 PM
Small Image Hover Views Big Image (Not Separate Window, though) Jason Heydasch Javascript 1 02-01-2004 03:16 AM



Advertisments