Ciao
ho un probblema con uno script.
Non funziona, probabilmente dovrei mettere il codice all'interno delle stesso div, ma non è possibbile perchè il riferimento mi serve altrove.
questo è il codice:
codice:
<script type="text/javascript" language="javascript">
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
</script>
questo è il collegamento nel body dove richiamo le immagini
questo è dove lo visualizzo:
codice:
<p id="desc"></p>
<img id="placeholder" /><
vi posto anche il codice intero della pagina
codice:
<script type="text/javascript" language="javascript">
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="901" height="526" border="0" align="center" cellpadding="0" class="bordo" cellspacing="0" id="Table_01">
<tr>
<td width="901" height="110"></td>
</tr>
<tr>
<td align="center" valign="middle" >
</td>
</tr>
<tr>
<td width="901" height="385"><table width="888" height="367" border="0">
<tr>
<td width="116" align="center" valign="top">
[img]images/1-P5230001.jpg[/img]
[img]images/1-P5230004.jpg[/img]
[img]images/1-P5230008.jpg[/img]
[img]images/1-P5230011.jpg[/img]
</td>
<td width="405" align="center" valign="top"></td>
<td width="353" align="center" valign="top">
<p id="desc"></p>
<img id="placeholder" /></td>
</tr>
</table></td>
</tr>
<table width="896" border="0">
<tr>
<td height="39" class="galleria1 row_bord">pag. 1 - 20 </td>
<td width="145" class="pagine row_bord">pag. 1,2,3,4,>> </td>
</tr>
</table></p></td>
</tr>
<tr>
<td valign="middle" colspan="2" background="images/last.jpg" height="20" style="color: #652200" align="right">td>
</tr>
</table>
</body>
</html>
Grazie
elena