In the following piece of code, execution of eval() is not working in FireFox.
Pls provide the suggestions.
Here, filenames array is having the array of HTML5 audio tag elements.Code:var str="audioElement[0].play();"; for(i=0;i<fileNames.length-1;i++) { str = str + "audioElement[" + i + "].addEventListener('ended', function() {audioElement[" + (i+1) + "].play();}, false);"; } str = str + "audioElement[" + (fileNames.length-1) + "].addEventListener('ended', function(){}, false);"; eval(str);



Reply With Quote




Bookmarks