Hello i am not familiar with returning HTML in Javascript code. I have this code. I want to return an audio player but nothing returns.
var uploadImageHTMLTitle='<audio controls preload="metadata" id="'+data.msg_id+'">';
var uploadImageHTMLFooter='</audio>';
var uploadImageHTML='';
var C='';
if(data.uploadPaths.length)
{
if(data.uploadPaths.length > 1)
{
uploadImageHTML+=uploadImageHTMLTitle;
for(var i=0; i<data.uploadPaths.length; i++)
{
C='<source src="'+data.uploadPaths[i]+'" type="audio/mp3" /><source src="'+data.uploadPaths[i]+'" type="audio/mp4" /><source src="'+data.uploadPaths[i]+'" type="audio/wav" /><source src="'+data.uploadPaths[i]+'" type="audio/ogg" />';
uploadImageHTML += C;
}
uploadImageHTML+=uploadImageHTMLFooter;
sliderLoad(data.msg_id);
}
else
{
uploadImageHTML='<source src="'+data.uploadPaths[0]+'" type="audio/mp3" /><source src="'+data.uploadPaths[0]+'" type="audio/mp4" /><source src="'+data.uploadPaths[0]+'" type="audio/wav" /><source src="'+data.uploadPaths[0]+'" type="audio/ogg" />';
}
}