Ronx said:
If the large image is replacing the small image, it will share the
same width and height as the small image. If it is being displayed
elsewhere - a different place in the page or in a new window - then
the dimensions are probably being set by the JavaScript function. We
would need to see the content of that function.
And the page
http://www.postalstampssale.com/Aden.htm still does not
exist for anyone to look at.
Ron,
Thank you for picking me up on that
I did mean that the larger image should open somewhere else. But I didn't
think to say so (says he shamefacedly).
I agree that we need to see the page.
Larry,
Below is what I use on my page :
http://tandcl.homemail.com.au (with thanks
to others whose scripts I have used, slightly amended, and who will
recognise them)
The same image is used, but when first displayed, it has height = "80". The
larger one is full size, with the window size adjusted to suit.
Click on the top left or top right image on the home page to see it working.
<a href='#'
onclick="newWindow('images/display/trevor.jpg','Trevor');return false;">
<img src="images/display/trevor.jpg" alt="" title='Click to see a larger
picture' height="80" />
</a>
The functions are
function newWindow(img,caption)
{
var imageToLoad = new Image()
new function testit()
{ imageToLoad.src = img
// we need a little pause while the script gets the image since the
image is on the server,
// or the browser will open the window and write the script before the
image is cached,
// which causes the script to write zeros for the resizeto dimensions.
setTimeout(loadit,1000)
function loadit()
{
var h = imageToLoad.height,
w = imageToLoad.width
if (h == 0)
testit()
else
spawnJimcoPopup
( 'picture.html?picture=' + img
+ '&caption=' + caption
+ '&height=' + h
+ '&width=' + w
, '_blank'
,
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'
, h + 50, w, 'center', '0', 'pixel')
} // end loadit()
} // end testit()
}
function spawnJimcoPopup(url, name, options, h, w, x, y, scaleType)
{
var newWindow
if (scaleType == 'percent')
{ h = (h * screen.availHeight) / 100
w = (w * screen.availWidth) / 100 }
if (x == 'center')
x = (screen.availWidth - w) / 2
if (y == 'center')
y = (screen.availHeight - h) / 2
options += ',width=' + w + ',height=' + h
+ ',left=' + x + ',top=' + y
newWindow = window.open(url, name, options)
newWindow.focus()
}
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website:
http://trevorl.mvps.org/
----------------------------------------