if i’m not allowed to post URL’s here than ignore my link but i feel it will help you understand my problem. [url]http://foxarch.com/portfolio/Restaurants/00056_DairyQueen/index.htm
the main image on the right hand side of the page has a fixed size because my JavaScript doesn’t change the picture sizes at all. it’s a freeware code that our previous webmaster grabbed and i can’t figure out where to edit it to incorporate image size.
the icons above the image when rolled over change the big image below.
now here is my code… hopefully i can get an idea of where i can insert a line of code to change the image size to be whatever i want it to be. i would like to use percentage so that whatever window size a browser is using they will see the whole image.
[code=php]<html>
<head>
<script type=”text/javascript” language=”javascript”>
var dynimages=new Array()
dynimages[1]=[“001.jpg”, “”]
dynimages[2]=[“002.jpg”, “”]
dynimages[3]=[“003.jpg”, “”]
var preloadimg=”yes”
var optlinktarget=””
var imgborderwidth=0
if (preloadimg==”yes”){
for (x=0; x<dynimages.length; x++){
var myimage=new Image()
myimage.src=dynimages[x][0]
}
}
function returnimgcode(theimg){
var imghtml=””
if (theimg[1]!=””)
imghtml='<a href=”‘+theimg[1]+'” target=”‘+optlinktarget+'”>’
imghtml+='<img src=”‘+theimg[0]+'” border=”‘+imgborderwidth+'”>’
if (theimg[1]!=””)
imghtml+='</a>’
return imghtml
}
function modifyimage(loadarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML=returnimgcode(dynimages[imgindex])
imgobj.filters[0].Play()
return false}}
</script>
<style type=”text/css”>
div.icon {float: right; width:70%; background: #000000}
div.dynloadarea {float: right; width:70%; background: #00CC00}
</style>
</head>
<body>
<h4>Dairy Queen </h4>
<div class=”icon”>
<a onmouseover=”modifyimage(‘dynloadarea’, 1)” href=”#”><img title=”Rendering” src=”001_thumb.jpg” border=”0″ width=”25pt”></a>
<a onmouseover=”modifyimage(‘dynloadarea’, 2)” href=”#”><img title=”Hackettstown Before Construction” src=”002_thumb.jpg” border=”0″ width=”25pt”></a>
<a onmouseover=”modifyimage(‘dynloadarea’, 3)” href=”#”><img title=”Model Left Side” src=”003_thumb.jpg” border=”0″ width=”25pt”></a>
</div>
<div id=”dynloadarea” class=”dynloadarea”>
<img src=”001.jpg” border=”0″ width=”100%”>
</div>
<p>this is where a paragraph of text would appea</p>
</body>
</html>