display the message's detail using js