read only field in certain condition

Hi to all, actually my client request me a thing. In account module i have a text field, he has to be readonly IF another field(dropdown) of the account has a selected value when i open it. I can’t figure where i could edit the view or the vardef to make this. Any suggest?

Thanks all

write a custom js and inclue in detail view of accounts.