Fixes Javascript to posts to rails app. 

Also adds the links into the html.