Snippets

Gregory Jenkins Grab URL Parameter and Populate Field

Created by Greg Jenkins
<script>
function getURLParameter(p_param)
{
return decodeURIComponent((new RegExp('[?|&]' + p_param + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href)||        [,""])[1].replace(/\+/g, '%20'))||null;
}

jQuery(document).ready(function()
{
 jQuery('#emailAddress').val(getURLParameter('EmailAddress'));
});


</script>

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.