﻿// JScript File
function checkLength(field)
{
    var len = field.getAttribute('MaxLength');
    if (field.value.length > len) // too long...trim it!
    {
        field.value = field.value.substring(0, len);
        alert('You have reached the maximum length.');
    }
}
