[thelist] (no subject)

Philip Wilkins philip_wilkins at hotmail.com
Tue Aug 8 03:18:39 CDT 2000


Not sure if you do this but I hope you can help me please!!!!

I have the following code

<HTML>

   <HEAD>
</HEAD>


<BODY>
<P ALIGN="right">&nbsp;</P>

<p>
   <script language="JavaScript">
<!-- begin hiding
// first image should be named 001.gif or 001.jpg.
// All images do not have to have the same extension, ie. .gif or .jpg, but
it an image has to be either an jpg or gif


function switchExtension(num,nam,now) {
var ext
if (extension == ".gif") {
ext = ".jpg"
} else {
ext = ".gif"
}
goodImage[num-1] = now + ext
eval("document." + nam + ".src='" + now + ext + "'")
}
var imgNumber = 2 // how many images
var currCount = 0 // keep count of how many images are on the same line
var maxImgs = null // Max number of images on the same line, putt null for
unlimited (default)
var addZeros // preceeds a number with zeros
var imgNow // current image URL
var extension = ".jpg" // extenstion of most (preferably all) of your
images.
var wxtension = ".htm"
var imgName // name of current image
var imageWidth = "75" // Width of all images; remove quotes and set to null
for normal size
var imageHeight = "88" // Height of all images; remove quotes and set to
null for normal size
winImage = new Array()
goodImage = new Array()
for (var i = 1; i <= imgNumber; i++) {
if (i < 10) {
addZeros = "M00"
} else if (i < 100 && i >= 10) {
addZeros = "M0"
} else if (i == 100) {
addZeros = "M"
}
imgName = "i" + addZeros + i
imgNow = addZeros + i
goodImage[i-1] = imgNow + extension
winImage[i-1] = imgNow + wxtension
if (maxImgs) {
if (currCount == maxImgs) {
document.write("<br>")
currCount = 0 // reset counter for the next line
}
}
var size = ((imageWidth) ? "width=" + imageWidth : "") + ((imageHeight) ? "
height=" + imageHeight : "")
document.write('<a href="' + (imgNow+wxtension) + '" target="_blank")<img
src="' + (imgNow+extension) + '"' + size + ' name="' + imgName + '"
border="0" onError="switchExtension(\'' + i + '\',\'' + imgName + '\',\'' +
imgNow + '\')"></a><img src="spacer.jpg">')
currCount++ // increment by one
}
// end hiding -->
</script>
</p>
<p><a href="file:///C%7C/Lizard%20productions/map.htm"><font face="Arial,
Helvetica, sans-serif"><b><i><font
color="#000000">BACK</font></i></b></font></a>
</p>
<P></P>
   </BODY>
</HTML>

The document.write('<a href="' + (imgNow+wxtension) + '" 
target="_blank")<img
src="' + (imgNow+extension) + '"' + size + ' name="' + imgName + '"
border="0" onError="switchExtension(\'' + i + '\',\'' + imgName + '\',\'' +
imgNow + '\')"></a><img src="spacer.jpg">') line is the problem, I want to 
be able to alter the hight,
width and get rid of scrollbars etc but whenever I try and use javascript
for the link it never works!!!

Any help would be great

Philip Wilkins

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com





More information about the thelist mailing list