You'll get "Object Expected" errors if the object doesn't exist as you described it in your code.

Thus, if there is no object with the ID of "consignment", or if that object has no value attribute (ie: isn't an input field that can contain a value) then any references to document.getElementById('consignment').value will fail.

Either your DOM description of the object is not correct or the object doesn't exist on the page you're loading.