A test page would be useful in this situation so we can see what you're trying to do exactly. If by "pop up form" you mean a popup window with a form in it, then you're probably going to want to look into window.opener, not document.referrer.
setup the script to run once the popup is finished loading and it should populate the textarea (with both name & id equal to "message") with the URL of the page that opened the popup
ditto to what ljromanoff said... this board is designed to help others, and if one person encounters a problem, it's likely others will as well, so it's best to leave your posts unedited so others with similar issues can instantly find the solutions they're looking for without having to post about topics that have already been discussed.
as for what this thread was about (so others will know), kmg had a popup window with a form and when the popup window loaded, he needed to populate a textarea in the form with the URL of the webpage that opened the popup window