Could someone tell me why this isn't auto filling my email field?

I'm using
document.getElementById("form_email").value = '<?php echo $userdata->user_email; ?>';
to try and pre-fill the field...