Is customerEmail the id of your text box input?
If you’re using a form you’re probably using the name attribute and not the id attribute. If your text box is named customerEmail then you should access it as document.[form name].[input name].value = xxx, where input name is customerEmail.