In article <email@example.com>,
firstname.lastname@example.org enlightened us with...
> I've only gotten as far as getting the larger images to open in a new
> window at a set size in the function. I thought I could just make
> specific scripts for each image, but that would be cumbersome to say
> the least. There has to be an easier way, right?
Yes, but it may not be supported.
You can resize the window. However, knowing what size to resize it TO can be
a pain when doing it cross-browser. Different browsers use different syntax
to access the sizes of things like the browser screen. And if there are
scrollbars, toolbars, or whatnot will matter. And browsers can disallow you
from removing those things.
There are a lot of posts in the archives for this group about how to resize
the window to fit the content.
Keep in mind that browsers can disallow resizing altogether, too(mine does).
In fact, my browser (firefox) redirects ALL window.open statements to a new
tab. So if you resize, it resizes everything. Which is very irritating. So I
turned off resizing. ;)
Why do you feel the need to use popups for this content? When you do stuff
like that, tabbed browser users generally can't middle-click and open in a
new tab, which is what we often prefer. You can support both things (new
window for some who like that, new tab for others who prefer that) by
providing a good link, like
<a href="thePic.jpg" onClick="myOpenScript('thePic.jpg');return false;"><img
People who just left click will get your open script. Middle-clicking (for us
3-button mouse users) will follow the href. And it supports right-clicking
for MSIE. From my testing, at least, onClick only seems to fire on LEFT
Cthulhu Saves. He might get hungry later.