Rating view with javascript