A function is attached to the form's 'onsubmit' event which executes once the the submit button is pressed but before the form data is sent to the server. The form element's value is extracted ( using the DOM ), and a check is made to see if it is longer than 2000 chars. If it is not, the form data is sent. if it is, the function returns false and the suer is returned to the form.