How to display history records in the popup balloon

I want to create a popup balloon showing the latest records I have put in with the date of input, and then create a link to another popup window showing all the history records I previously put in, again with the date of input. How do I go about doing this? Thank you!