Hi I am new to JavaScript. I am create a web page using VB.NET. There is multiple sound files in an array and I want to play then one after the other in sequence. But at the present only the last sound file is being played.
Here is the code
function PlayQuestion(soundfiles)
{
if (soundfiles.length>0)
{
soundArray =soundfiles.split(“,”)
counter =soundArray.length
for(i=0 ;i<counter ;i++)
{
if (navigator.appName==”Netscape”)
{
if (document.getElementById)
{
document.getElementById(“soundspan”).innerHTML=”<embed src=’Voice/”+soundArray[i]+”.wav’ hidden=true autostart=true loop=false>”;
thissound=document.getElementById(‘soundspan’);
}
}
else
{
if (document.all && document.getElementById)
{
document.getElementById(“soundeffect”).src=””
document.getElementById(“soundeffect”).src=soundArray[i]
}
}
}
}
}
Could some one please help me on this.