celticking
Technical User
I have the following code.
<head>
function doPic(imgName) {
if (document.images) {
document.mainpic.src = imgName;
}
}
var img_one = new Image();
img_one.src = "art/pic1.jpg";
var img_two = new Image();
img_two.src = "art/pic2.jpg";
var img_three = new Image();
img_three.src = "art/pic3.jpg";
var img_four = new Image();
img_four.src = "art/pic4.jpg";
</script>
<body>
<table width=120 height=148 border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td height="161" valign="top" colspan=4 align=center><img name="mainpic" src="art/pic1.jpg" width=120 height=148 border=0></td>
</tr>
<tr>
<td width="32" height="42" valign="top"> <a href="javascript:doPic('art/pic1.jpg');"><img src="art/pic1.jpg" width=30 height=40 border=1></a></td>
<td width="32" valign="top"> <a href="javascript:doPic('art/pic2.jpg');"><img src="art/pic2.jpg" width=30 height=40 border=1></a></td>
<td width="32" valign="top"> <a href="javascript:doPic('art/pic3.jpg');"><img src="art/pic3.jpg" width=30 height=40 border=1></a></td>
<td width="32"valign="top"> <a href="javascript:doPic('art/pic4.jpg');"><img src="art/pic4.jpg" width=30 height=40 border=1></a></td>
</tr>
</table>
This all works fine but the main pic is a little small in higher resolutions. I want to make the main pic a link to open a larger picture in a new window but i'm having difficulties. Can anyone help me with this?
Thanks.
<head>
function doPic(imgName) {
if (document.images) {
document.mainpic.src = imgName;
}
}
var img_one = new Image();
img_one.src = "art/pic1.jpg";
var img_two = new Image();
img_two.src = "art/pic2.jpg";
var img_three = new Image();
img_three.src = "art/pic3.jpg";
var img_four = new Image();
img_four.src = "art/pic4.jpg";
</script>
<body>
<table width=120 height=148 border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td height="161" valign="top" colspan=4 align=center><img name="mainpic" src="art/pic1.jpg" width=120 height=148 border=0></td>
</tr>
<tr>
<td width="32" height="42" valign="top"> <a href="javascript:doPic('art/pic1.jpg');"><img src="art/pic1.jpg" width=30 height=40 border=1></a></td>
<td width="32" valign="top"> <a href="javascript:doPic('art/pic2.jpg');"><img src="art/pic2.jpg" width=30 height=40 border=1></a></td>
<td width="32" valign="top"> <a href="javascript:doPic('art/pic3.jpg');"><img src="art/pic3.jpg" width=30 height=40 border=1></a></td>
<td width="32"valign="top"> <a href="javascript:doPic('art/pic4.jpg');"><img src="art/pic4.jpg" width=30 height=40 border=1></a></td>
</tr>
</table>
This all works fine but the main pic is a little small in higher resolutions. I want to make the main pic a link to open a larger picture in a new window but i'm having difficulties. Can anyone help me with this?
Thanks.