using the Client script on the load of the form if service no is empty means then i want to make issue relate to is Service

using the Client script on the load of the form
if service no is empty means then i want to make issue relate to field is Service
if Purchae no is empty means then i want to make issue relate to is Purchase