Details of hostel also added with onclick event in javascript