Code: HTML
<HTML>
<HEAD>
<TITLE>Binding 2 text fields and changing format</TITLE>
<script language="JavaScript">
function addEmail(oField)
{
    var v = oField.value.replace(/[ ]+/,'.');
    v = v+'@myexample.co.uk';

    oField.form.elements['email'].value = v;
}
</script>
</HEAD>

<BODY>
<form>
<input type="text" name="name" onBlur="addEmail(this);"><br/>
<input type="text" name="email"><br/>
</form>
</BODY>
</HTML>