Ajax Event - Using IF statement to check if field is disabled

Hello, I’m curious how do we check if field is disabled using Ajax:

Field name: customer_name
How do we apply in Ajax IF statement to check if customer_name field is disabled then prompt a message?
I tried the following codes to test but it doesn’t work:


if({customer_name}==‘disabled’){
sc_ajax_message (“The field is disabled.”);
}

Please advise, thank you!