Re: JavaScript help

by "Donna Smillie" <dms(at)zetnet.co.uk>

 Date:  Tue, 24 Jun 2003 08:52:24 +0100
 To:  <hwg-techniques(at)hwg.org>
 Cc:  <raidermp(at)yahoo.com>
 References:  f6470
  todo: View Thread, Original
Hi Thomas

Instead of using "Max" as the name for all of the popup windows, simply call
one size of window "Max1" and the other size "Max2", or something like that.
If you give the different sizes different names, then even if the user
leaves the popup window open, each image will load into a popup window of
the correct size.  Assuming you've just got two sizes of image, that only
results in a possible two popup windows in addition to the main window.  For
example:

<.td height="20" width="27%">
<.div align="center">
<.font face="Arial, Helvetica, sans-serif" color="#666666" size="2">
<.a href= "ym_screenshots/firefighter3.jpg"
onClick="window.open('ym_screenshots/firefighter3.jpg','Max1',
'toolbar=no,width=273,height=420,left=200,top=200,
screenX=200,screenY=200,status=no,scrollbars=no,resize=no');return
false">Preview</a>
 - <.a href= "ym_screenshots/IM_firefighter3.jpg"
onClick="window.open('ym_screenshots/IM_firefighter3.jpg','Max2',
'toolbar=no,width=322,height=245,left=200,top=200,
screenX=200,screenY=200,status=no,scrollbars=no,resize=no');return false">IM
Preview</a></font> </div>
</td>

Of course, you then have the issue of the existing popup windows possibly
being behind the main window if the user has that maximised.

Also suggest you consider using "href='[image url]'" as part of the link
code (as shown in the example above), as that will ensure that those with
JavaScript switched off (or popups switched off) to view the images, albeit
in the main window rather than in a popup window.

HTH!

Regards,
Donna

----- Original Message (edited) -----
From: "Thomas Fisher" <raidermp(at)yahoo.com>
To: <hwg-techniques(at)hwg.org>
Sent: Tuesday, June 24, 2003 4:17 AM
Subject: RE: JavaScript help


> The URL for the page is: http://tinyurl.com/f3ba
> The ones I am asking about are the Preview and IM Preview links.  You
> will see the difference in size.
> Now, in IE 6, it isn't much of a problem, since if the user doesn't
> change the default setting, the image will fit to the window.  But I
> want it to show the actual size, not be forced to fit the window.
> Thomas

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.