how to disable a textbox in javascript based on condition