I'm new to Salesforce, so if this is trivial, accept my apologies in advance.

I have a button that points to an internal website. This button grabs looks at a custom field and uses that custom field as a passable parameter. The button is working as it should, but I'm needing more functionality.

What I'm looking to do is hide the button or display a popup message if my custom field is blank.

EDIT: So it looks like Javascript is what I'm looking for since we cannot hide the button.

This is what I have right now when I click a button. It opens up an internal report and passes the parameter that is in the KEY4__c custom field:

http://linktoreportserver/Parameter={!Lead.KEY4__c}


If the KEY4__c field is empty or null, I want it to send a popup to the user. If there is data, I want it to go to the URL above.


Question: Why is a precoder necessary for DQPSK and what does it accomplish?
Answer: Regard the dibits as Gray code representations of the
integers $0,1,2,3$, more specifically,

$$[0, 0] \leftrightarrow 0, ~~ [0, 1] \leftrightarrow 1, ~~ [1, 1] \leftrightarrow 2, ~~ [1, 0] \leftrightarrow 3.$$

Then, the precoding scheme is nothing but differential encoding for QPSK
with   

to send = prev - to_encode modulo $4$.  

For example the line [ 1 0 ] [ 0 1 ] [ 1 1 ] in the question says that to encode $3 = $ [1 0]  when the previous symbol was $1 = $ [0 1], we send $1-3 = -2 \equiv 2 \bmod 4$ where $2 =$ [1 1].
As stated in the answers and comments
on the previous question, 


  Differential encoding for QPSK is not the same as differential 
  (binary) encoding of the I and Q bit streams separately.


So the precoding scheme is just differential encoding for QPSK.
As to why it is included in the system, it must be that the
channel characteristics and system requirements are such that 
coherent detection of the signal is not thought to be feasible, 
and so the receiver is being implemented 
is a differentially coherent detector for DQPSK (differentially encoded 
QPSK).  Note that coherent detection requires that the receiver
phase lock loop acquire (and track) the incoming carrier in 
both frequency and phase (including resolution of
the four-fold phase ambiguity) while for differentially coherent
detection, frequency acquisition and tracking suffices, so that
the receiver is simpler and more robust, though of course 
for a given SNR, the BER of the differentially coherent
receiver is higher than the BER of the coherent receiver.