Please help me add in code that allow Mouse-Over image would
display the file name of that image (but not full path).
Thx
======Code=========
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;">
<title>Andrew 1st Month</title>
<link rel="stylesheet" href="http://www.jasonanhkhoa.com/HTML/AndrewStyle01.css" type="text/css">
<script type="text/javascript">
<!--
var imgarray = new Array();
imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_08.jpg","");
imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_09.jpg","");
imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_10.jpg","");
function nextimg(){
num=(num==imgarray.length-1)?0:num+1;
document.getElementById("change").src=imgarray[num][0];
document.getElementById("discription").replaceChild(document.createTextNode(imgarray[num][1]), document.getElementById("discription").firstChild);}
function previmg(){
num=(num==0)?imgarray.length-1:num-1;
document.getElementById("change").src=imgarray[num][0];
document.getElementById("discription").replaceChild(document.createTextNode(imgarray[num][1]), document.getElementById("discription").firstChild);}
function rotateimg(){
if(n==1){
nextimg();
window.setTimeout("rotateimg()",time_delay);}}
function cycleimg(){
n=(n==0)?1:0;
document.getElementById("cycle").value=(n==1)?"Stop Cycling Images":"Start Cycling Images";
document.getElementById("prev").disabled=(n==1)?true:false;
document.getElementById("next").disabled=(n==1)?true:false;
if(n==1){window.setTimeout("rotateimg()",time_delay);}}
//--></script>
</head>
<body>
<center><BOLD><FONT FACE="ThaHuong 1.1" size=5 color=Blue>
<div id="discription">Andrew 1st Month</div>
<form id="control">
<img src="http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew012604_01.jpg" border="0" id="change"></a><br>
<input type="button" id="prev" class="but" onclick="previmg();" value="Previous Image">
<input type="button" id="next" class="but" onclick="nextimg();" value="Next Image">
<input type="button" id="cycle" class="but" onclick="cycleimg();" value="Start Cycling Images">
</form>
</center>
</body>
display the file name of that image (but not full path).
Thx
======Code=========
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;">
<title>Andrew 1st Month</title>
<link rel="stylesheet" href="http://www.jasonanhkhoa.com/HTML/AndrewStyle01.css" type="text/css">
<script type="text/javascript">
<!--
var imgarray = new Array();
imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_08.jpg","");
imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_09.jpg","");
imgarray[imgarray.length] = new Array("http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew013004_10.jpg","");
function nextimg(){
num=(num==imgarray.length-1)?0:num+1;
document.getElementById("change").src=imgarray[num][0];
document.getElementById("discription").replaceChild(document.createTextNode(imgarray[num][1]), document.getElementById("discription").firstChild);}
function previmg(){
num=(num==0)?imgarray.length-1:num-1;
document.getElementById("change").src=imgarray[num][0];
document.getElementById("discription").replaceChild(document.createTextNode(imgarray[num][1]), document.getElementById("discription").firstChild);}
function rotateimg(){
if(n==1){
nextimg();
window.setTimeout("rotateimg()",time_delay);}}
function cycleimg(){
n=(n==0)?1:0;
document.getElementById("cycle").value=(n==1)?"Stop Cycling Images":"Start Cycling Images";
document.getElementById("prev").disabled=(n==1)?true:false;
document.getElementById("next").disabled=(n==1)?true:false;
if(n==1){window.setTimeout("rotateimg()",time_delay);}}
//--></script>
</head>
<body>
<center><BOLD><FONT FACE="ThaHuong 1.1" size=5 color=Blue>
<div id="discription">Andrew 1st Month</div>
<form id="control">
<img src="http://www.jasonanhkhoa.com/Images/Andrew/2004/1stMonth/Andrew012604_01.jpg" border="0" id="change"></a><br>
<input type="button" id="prev" class="but" onclick="previmg();" value="Previous Image">
<input type="button" id="next" class="but" onclick="nextimg();" value="Next Image">
<input type="button" id="cycle" class="but" onclick="cycleimg();" value="Start Cycling Images">
</form>
</center>
</body>
Comment