I am trying to create an audio player using html and javascript, no jquery. I've got a selection of albums that need to return the songs from the album. I will then select a song and it will play. This is my code so far. I know it's extremely messy, I'm just a beginner so do forgive.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="music.js"></script>
<style type="text/css"></style>
</head>
<body>
<table width="400" height="400" border="1" style="display: inline-block;">
<caption>Albums</caption>
<tr>
<td><p>Please select an album from the list
<select name='Album'>
<option>Birdsong Small Birds</option>
<option>Birdsong Large Birds</option>
<option>Birdsong Medium Birds</option>
<option>Birdsong Finches</option>
<option>Birdsong Tits</option>
</select>
</select>
</td>
</tr>
</table>
<table width="400" height="400" border="1" style="display: inline-block;">
<caption>Songs</caption>
<tr>
<td>a</td>
</tr>
</table>
<table width="400" height="400" border="1" style="display: inline-block;">
<caption>
Selected Songs
</caption>
<tr>
<td>a</td>
</tr>
</table>
</body>
</html>
So when I select an album in the first table the selection of songs I have will appear in the second table. Then when I select a song in the second table it will play in the last table
This is an example of what my final piece should look like
Example
I have a music.js file in the format:
var albums= [ { "title":"Birdsong Small Birds", "artist":"BBC", "artwork":"Wren", "tracks":[ {"title":"Dunnock","mp3":"Birdsong-Dunnock.mp3", "lyrics":"The Dunnock or hedge sparrow has a fast warbling song often delivered from the top of a hedge or bush"},
This is a small piece as it contains all the album folders with each song.