year prompt still not saved to a variable

put on a method and use document.input (hidden input) to save year