gbv
25-06-2008, 17:21
ciao a tutti
premetto che sono alle prime armi,
avrei bisogno di aiuto per gestire il fade in e out
ho le funzioni (high e low)ma non so da dove richiamarle
[JavaScript]<script language="JavaScript">
function apri(conta){
nuovo=new Array("foto1.jpg","foto2.jpg","foto3.jpg")
parent.document.galle.src=nuovo[conta]
}
</script>
<script type="text/javascript" language="JavaScript">
<!--
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}
function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
//-->
</script>
</head>
<body>
<table width="744" height="186" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="129" scope="col"><table width="120" height="258" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="80" align="center" valign="middle" scope="col"><div align="center"><a href="javascript:high(apri(0))"><img border=0 style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" src="foto1.jpg" width="100" onMouseOver="this.src='foto1.jpg';this.width=120" onMouseOut="this.src='foto1.jpg';this.width=100"></a></div></th>
</tr>
<tr>
<td height="80" align="center" valign="middle"><div align="center"><a href="javascript:low(apri(1))"><img src="foto2.jpg" width="100" border="0" style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" onMouseOver="this.src='foto2.jpg';this.width=120" onMouseOut="this.src='foto2.jpg';this.width=100"></a></div></td>
</tr>
<tr>
<td height="80" align="center" valign="middle"><div align="center"><a href="javascript:apri(2)"><img border=0 style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" src="foto3.jpg" width="100" onMouseOver="this.src='foto3.jpg';this.width=120" onMouseOut="this.src='foto3.jpg';this.width=100"></a></div></td>
</tr>
</table></th>
<th width="495" scope="col"><div align="center"><img src="foto2.jpg" name="galle" width=450 align=center></div></th>
<th width="120" scope="col"><table width="120" height="86" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="80" align="center" valign="middle" scope="col"><div align="center"><a href="javascript:apri(0)"><img border=0 style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" src="foto1.jpg" width="100" onMouseOver="this.src='foto1.jpg';this.width=120" onMouseOut="this.src='foto1.jpg';this.width=100"></a></div></th>
</tr>
<tr>
<td height="80" align="center" valign="middle"><div align="center"><a href="javascript:apri(1)"><img src="foto2.jpg" width="100" border="0" style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" onMouseOver="this.src='foto2.jpg';this.width=120" onMouseOut="this.src='foto2.jpg';this.width=100"></a></div></td>
</tr>
<tr>
<td height="80" align="center" valign="middle"><div align="center"><a href="javascript:apri(2)"><img border=0 style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" src="foto3.jpg" width="100" onMouseOver="this.src='foto3.jpg';this.width=120" onMouseOut="this.src='foto3.jpg';this.width=100"></a></div></td>
</tr>
</table></th>
</tr>
</table>
in pratica vorrei aprire le immagini con il fade in
premetto che sono alle prime armi,
avrei bisogno di aiuto per gestire il fade in e out
ho le funzioni (high e low)ma non so da dove richiamarle
[JavaScript]<script language="JavaScript">
function apri(conta){
nuovo=new Array("foto1.jpg","foto2.jpg","foto3.jpg")
parent.document.galle.src=nuovo[conta]
}
</script>
<script type="text/javascript" language="JavaScript">
<!--
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}
function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
//-->
</script>
</head>
<body>
<table width="744" height="186" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="129" scope="col"><table width="120" height="258" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="80" align="center" valign="middle" scope="col"><div align="center"><a href="javascript:high(apri(0))"><img border=0 style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" src="foto1.jpg" width="100" onMouseOver="this.src='foto1.jpg';this.width=120" onMouseOut="this.src='foto1.jpg';this.width=100"></a></div></th>
</tr>
<tr>
<td height="80" align="center" valign="middle"><div align="center"><a href="javascript:low(apri(1))"><img src="foto2.jpg" width="100" border="0" style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" onMouseOver="this.src='foto2.jpg';this.width=120" onMouseOut="this.src='foto2.jpg';this.width=100"></a></div></td>
</tr>
<tr>
<td height="80" align="center" valign="middle"><div align="center"><a href="javascript:apri(2)"><img border=0 style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" src="foto3.jpg" width="100" onMouseOver="this.src='foto3.jpg';this.width=120" onMouseOut="this.src='foto3.jpg';this.width=100"></a></div></td>
</tr>
</table></th>
<th width="495" scope="col"><div align="center"><img src="foto2.jpg" name="galle" width=450 align=center></div></th>
<th width="120" scope="col"><table width="120" height="86" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="80" align="center" valign="middle" scope="col"><div align="center"><a href="javascript:apri(0)"><img border=0 style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" src="foto1.jpg" width="100" onMouseOver="this.src='foto1.jpg';this.width=120" onMouseOut="this.src='foto1.jpg';this.width=100"></a></div></th>
</tr>
<tr>
<td height="80" align="center" valign="middle"><div align="center"><a href="javascript:apri(1)"><img src="foto2.jpg" width="100" border="0" style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" onMouseOver="this.src='foto2.jpg';this.width=120" onMouseOut="this.src='foto2.jpg';this.width=100"></a></div></td>
</tr>
<tr>
<td height="80" align="center" valign="middle"><div align="center"><a href="javascript:apri(2)"><img border=0 style="FILTER: alpha(opacity=20, finishopacity=100, style=1)" src="foto3.jpg" width="100" onMouseOver="this.src='foto3.jpg';this.width=120" onMouseOut="this.src='foto3.jpg';this.width=100"></a></div></td>
</tr>
</table></th>
</tr>
</table>
in pratica vorrei aprire le immagini con il fade in