Is it possible to create a form field which sets itself to the last page visited?

For example: on this page - http://www.geocities.com/randomcowsd...oken_link.html
if you were to click on a link to this form would javascript be able to set it to the last page visited so that i can tell which page the error was on, reducing this risk of user error when inputting the URL.

Any help would be apprieciated,
Michael