made modification to javascript for message printing
made modification to javascript for message printing