PDA

View Full Version : image.width and netscape


Crash1hd
07-13-2002, 11:05 AM
I have found trying t use image.width in netscape doesnt work what is the netscape equivlant???? I want to make a slideshow that when you click on the next picture it shows the image for its proper size and not a preset width / height??

Help :cool::cool:

WA
07-13-2002, 11:07 AM
Unfortunately the problem is that Netscape 4 doesn't support dynamic image resizing, meaning the first image in the slide dictates the dimensions for the rest. In IE/NS6, just by not specifying a width/height tag inside IMG, the slideshow dynamically resizes depending on each image.

Crash1hd
07-13-2002, 11:09 AM
So You are saying that there is no work around I find that odd?

Is there a solution useing say asp or php? maybe


or Like useing somesort of function in the javascript to change the width="100" height="100" in the image pending on what the width / height is?

WA
07-13-2002, 11:26 AM
Well I wouldn't' say there's no solution, but it'll require basically completely rewriting the slideshow to utilize the <LAYER> tag in NS4. The layer tag allows you to dynamically rewrite content into it, in this case, each of the slideshow's images. It's a messy and "unstable" solution though, as the LAYER tag is this way.

Server side languages cannot be used to change page content on the fly, at least not without reloading the page.

Crash1hd
07-13-2002, 11:29 AM
Ok Np What I did find though is if I type this into a htm file netscape shows the numbers no problem

<HTML>
<HEAD>
</head>
<TITLE></TITLE>
<body>
<IMG Name=Screen src=pict0001.jpg>

<script LANGUAGE="JavaScript1.2">
document.write(document.Screen.width)
</script>
</HTML>