Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (40 sloc) 1.23 KB
<!DOCTYPE html>
<title>Dynamic Select List Demo</title>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="dynamic_select.js"></script>
<p>Welcome to you!</p>
<p>These are the top songs:</p>
<% @top.each do |top_song| %>
<li><%= %> by <%= %></li>
<% end %>
<p>You can vote for songs here:</p>
<form method="post" action="/vote" onsubmit="return validateInput()">
<select id="genres_select" onChange="updateArtists()">
<option value="0">Select a genre</option>
<% @genres.each do |genre| %>
<option value="<%= %>"><%= %></option>
<% end %>
<select id="artists_select" disabled onChange="updateSongs()">
<select id="songs_select" disabled name="song_id">
<input type="submit" id="button" value="Vote!">
<p>Source for this app can be found
<a href="">here</a>.