What type of "routine"?
What "entry", and where are the entries stored, and in what format?
How do you want them "returned"?
Your question is unclear.
Please provide more information, and be as specific as possible.
- What do you want to accomplish?
- What have you already tried?
- What problems did you encounter?
Please be sure that you have included all relevant code and/or a link to the page in question.
You might also consider making a reduced test case
using an online tool like jsfiddle