PHP and Javascript are, in a sense, just two sides of the same coin. Javascript is for programming you want executed on the user's desktop, also known as "client-side scripting". Javascript is able to watch the user's actions and initiate behavior based upon it. This is the secret to the special effects seen in many AJAX applications, like Ask.com Maps or Shop.com.
