An even bigger question is, why would you need to? The server-side counterpart can find out the URL of the submitting page by looking at the HTTP_REFERER variable. But if you really need to, do this: window.onload = function() { document.forms[0].[I]hiddenFieldName[/I].value = location.href; }; Code (markup):