Pull request for CSC 517 OSS Project E1401

This is obtrusive javascript. Please change it to use [unobtrusive javascript](http://edgeguides.rubyonrails.org/working_with_javascript_in_rails.html).