Hi everyone,
I am trying to have an slideshow for people with disabilities such as vision or hearing limitations. The place that I need help with is the array of alt tags that synchronize with the right image. The alt tag is not working for me, any help really be greatly appreciated?
This is what I have so far working well.
I am trying to have an slideshow for people with disabilities such as vision or hearing limitations. The place that I need help with is the array of alt tags that synchronize with the right image. The alt tag is not working for me, any help really be greatly appreciated?
This is what I have so far working well.
Code:
<script>
var my_Dir = 'images/';
var martin_message = new Array();
martin_message[1] = "Description of my first image"
martin_message[2] = "Second image description";
martin_message[3] = "The last image description";
var my_images = new Array();
var SLIDE_load = new Array();
var SLIDE_status, SLIDE_timeout;
var SLIDE_actual = 1;
var SLIDE_speed = 3000;
var SLIDE_fade = 2;
for (i = 1; i <= martin_message.length-1; i++)
{
my_images[i] = my_Dir+i+'.jpg';
SLIDE_load[i] = new Image();
SLIDE_load[i].src = my_images[i];
}
var SLIDE_count = my_images.length-1;
function SLIDE_start()
{
document.getElementById('SLIDE_pause').disabled = true;
document.images.SLIDE_picBox.src = SLIDE_load[SLIDE_actual].src;
document.getElementById("SLIDE_textBox").innerHTML= martin_message[SLIDE_actual];
}
function SLIDE_play()
{
document.getElementById('SLIDE_play').disabled = true;
document.getElementById('SLIDE_pause').disabled = false;
SLIDE_actual++;
SLIDE_slide();
SLIDE_status = 'SLIDE_play';
SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}
function SLIDE_pause()
{
clearTimeout(SLIDE_timeout);
SLIDE_status = 'SLIDE_pause';
document.getElementById('SLIDE_pause').disabled = true;
document.getElementById('SLIDE_play').disabled = false;
}
function SLIDE_back()
{
clearTimeout(SLIDE_timeout);
SLIDE_actual--;
SLIDE_slide();
if (SLIDE_status != 'SLIDE_pause') SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}
function SLIDE_forward()
{
clearTimeout(SLIDE_timeout);
SLIDE_actual++;
SLIDE_slide()
if (SLIDE_status != 'SLIDE_pause') SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}
function SLIDE_slide()
{
if (SLIDE_status != 'SLIDE_pause')
{
document.getElementById('SLIDE_play').disabled = true;
document.getElementById('SLIDE_pause').disabled = false;
}
if (SLIDE_actual > (SLIDE_count)) SLIDE_actual=1;
if (SLIDE_actual < 1) SLIDE_actual = SLIDE_count;
if (document.all)
{
document.getElementById("SLIDE_textBox").style.background = "transparent";
document.images.SLIDE_picBox.style.filter="blendTrans(duration=2)";
document.images.SLIDE_picBox.style.filter="blendTrans(duration=SLIDE_fade)";
document.images.SLIDE_picBox.filters.blendTrans.Apply();
}
document.images.SLIDE_picBox.src = SLIDE_load[SLIDE_actual].src;
if (document.getElementById) document.getElementById("SLIDE_textBox").innerHTML= martin_message[SLIDE_actual];
if (document.all) document.images.SLIDE_picBox.filters.blendTrans.Play();
}
function SLIDE_speeds(SLIDE_valgt)
{
SLIDE_speed = SLIDE_valgt.options[SLIDE_valgt.selectedIndex].value;
}
</script>
</head>
<body bgcolor="#000000" onload="SLIDE_start()">
<center>
<table width="200" border="1">
<tr><td>logo</td></tr>
<tr>
<td><img name="SLIDE_picBox"><font color="#FFFFFF">
<div id="navigation" style="width:100%;position:absolute;bottom:15px;"></td>
</tr>
<tr>
<td height="50"><font color="#FFFFFF"><b><div id="SLIDE_textBox"></div></b></font></td>
</tr>
<tr>
<td><center>
<button type="button" id="SLIDE_back" onclick="SLIDE_back()">Prev</button>
<button type="button" id="SLIDE_play" onclick="SLIDE_play()">Play</button>
<button type="button" id="SLIDE_pause" onclick="SLIDE_pause()">Pause</button>
<button type="button" id="SLIDE_forward" onclick="SLIDE_forward()">Next</button>
</center>
</td>
</tr>
</table>
</div>
</center>
</body>
</html>