J
Jeremy
Perhaps someone can help me... This is actually the source of an asp
page but contains all the info for this particular function. I am
trying to allow someone to click a photo and allow a pseudo-window (to
avoid pop-up blocking) using css and table. When I try to call the id
in the function, it comes up undefined. Anyone know why??
Thanks in advance!
Jeremy
PS: The code -
<head>
<script language="JavaScript">
<!--
function Pic_Do() {
win.className='winShow'
}
function Pic_Get() {
var ident=0;
var src = new Array();
var ident = this.id;
src[0] ='../images/photos/7.jpg'
src[1] ='../images/photos/8.jpg'
src[2] ='../images/photos/9.jpg'
src[3] ='../images/photos/10.jpg'
src[4] ='../images/photos/11.jpg'
src[5] ='../images/photos/12.jpg'
src[6] ='../images/photos/13.jpg'
src[7] ='../images/photos/14.jpg'
src[8] ='../images/photos/15.jpg'
src[9] ='../images/photos/16.jpg'
document.images.SelPic.src = src[ident];
}
//-->
</script>
<style type="text/css">
<!--
..pics {
position: absolute;
left: 130px;
top: 115px;
font-size: small;
}
..WinHide {
visibility: hidden;
}
..WinShow {
background-color: #000033;
position: absolute;
visibility: visible;
height: 300px;
width: 500px;
left: 100px;
top: 120px;
}
-->
</style>
</head>
<BODY>
<FORM id="pic" name="picform" class="pics">
<table>
<tr>
<td id=0 onClick="Pic_Do(), Pic_Get()"><img src
='../images/photos/7.jpg' width='100' height='100'> <br>
</td>
<td id=1 onClick="Pic_Do(), Pic_Get()"><img src
='../images/photos/8.jpg' width='100' height='100'> <br>
</td>
<td id=2 onClick="Pic_Do(), Pic_Get()"><img src
='../images/photos/9.jpg' width='100' height='100'> <br>
</td>
<td id=3 onClick="Pic_Do(), Pic_Get()"><img src
='../images/photos/10.jpg' width='100' height='100'> <br>
</td>
</tr>
</table>
</FORM>
<form id="win" name="winForm" class="WinHide">
<img name="SelPic">
<input type="Button" OnClick="win.className='winHide'"
value="Close Window">
</form>
</BODY>
</HTML>
page but contains all the info for this particular function. I am
trying to allow someone to click a photo and allow a pseudo-window (to
avoid pop-up blocking) using css and table. When I try to call the id
in the function, it comes up undefined. Anyone know why??
Thanks in advance!
Jeremy
PS: The code -
<head>
<script language="JavaScript">
<!--
function Pic_Do() {
win.className='winShow'
}
function Pic_Get() {
var ident=0;
var src = new Array();
var ident = this.id;
src[0] ='../images/photos/7.jpg'
src[1] ='../images/photos/8.jpg'
src[2] ='../images/photos/9.jpg'
src[3] ='../images/photos/10.jpg'
src[4] ='../images/photos/11.jpg'
src[5] ='../images/photos/12.jpg'
src[6] ='../images/photos/13.jpg'
src[7] ='../images/photos/14.jpg'
src[8] ='../images/photos/15.jpg'
src[9] ='../images/photos/16.jpg'
document.images.SelPic.src = src[ident];
}
//-->
</script>
<style type="text/css">
<!--
..pics {
position: absolute;
left: 130px;
top: 115px;
font-size: small;
}
..WinHide {
visibility: hidden;
}
..WinShow {
background-color: #000033;
position: absolute;
visibility: visible;
height: 300px;
width: 500px;
left: 100px;
top: 120px;
}
-->
</style>
</head>
<BODY>
<FORM id="pic" name="picform" class="pics">
<table>
<tr>
<td id=0 onClick="Pic_Do(), Pic_Get()"><img src
='../images/photos/7.jpg' width='100' height='100'> <br>
</td>
<td id=1 onClick="Pic_Do(), Pic_Get()"><img src
='../images/photos/8.jpg' width='100' height='100'> <br>
</td>
<td id=2 onClick="Pic_Do(), Pic_Get()"><img src
='../images/photos/9.jpg' width='100' height='100'> <br>
</td>
<td id=3 onClick="Pic_Do(), Pic_Get()"><img src
='../images/photos/10.jpg' width='100' height='100'> <br>
</td>
</tr>
</table>
</FORM>
<form id="win" name="winForm" class="WinHide">
<img name="SelPic">
<input type="Button" OnClick="win.className='winHide'"
value="Close Window">
</form>
</BODY>
</HTML>