Buon pomeriggio a tutto il forum!
Gentili partecipanti a questo forum vorrei chiedere il vostro aiuto riguardo uno javascript sviluppato per mostrare una galleria di immagini.
Io vorrei che al posto della piccola area sotto ogni foto ove si può inserire un breve commento, togliere questa area e inserire al suo posto una textarea con background color e scrollbar colorata.
Come posso fare? Vi ringrazio in anticipo.
Sotto vi scrivo lo script.
-------------------------------------------------------------------
<html>
<head>
<title>Untitled</title>
</head>
<body>
<p align="center">
<table border="10" cellpadding="0" bordercolor="navy">
<caption><font color="red">Mike's pet dog</font></caption>
<tr>
<td width="100%"></td>
</tr>
<tr>
<td width="100%"><form method="POST" name="rotater">
<div align="center"><center>
<script language="JavaScript1.1">
var photos=new Array()
var text=new Array()
var which=0
var what=0
photos[0]="http://www.javascriptsolutions.com/imagesOLD/ministix6.jpg"
photos[1]="http://www.javascriptsolutions.com/imagesOLD/Img003.jpg"
photos[2]="http://www.javascriptsolutions.com/imagesOLD/Img004.jpg"
photos[3]="http://www.javascriptsolutions.com/imagesOLD/Img005.jpg"
photos[4]="http://www.javascriptsolutions.com/imagesOLD/ministix4.jpg"
photos[5]="http://www.javascriptsolutions.com/imagesOLD/ministix5.jpg"
text[0]="My first dog."
text[1]="A calm moment. EXTREMELY RARE!"
text[2]="Curious as to what that flash was all about"
text[3]="Mad at Momma for taking pictures."
text[4]="Libby striking back!"
text[5]="They make messes and they lay in them."
text[6]="Libby catching a frisbee, Ministix following."
window.onload=new Function("document.rotater.description.value=text[0]")
function backward(){
if (which>0){
window.status=''
which--
document.images.photoslider.src=photos[which];
what--
document.rotater.description.value=text[what];
}
}
function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
what++
document.rotater.description.value=text[what];
}
else window.status='End of gallery'
}
function type()
{
alert("This textbox will only display default comments")
}
</script>
<input type=text name="description" style="width:600px" size=350>
<p align="left">
<input type="button" value="<<Back" name="B2"
onClick="backward()"> <input type="button" value="Next>>" name="B1"
onClick="forward()">
Start Over</p>
</center></div>
</form>
</td>
</tr>
</table>
</p>
</body>
</html>