the reality is that a javascript alert when the add to cart button is pressed really doesn't tell the user anything that they dont already know
what would happen is that the user would press the add to cart button, the alert would be shown, then the information is sent to the server to add the item to the cart. it's not really possible to show an alert after the info is sent to the server to add it to the cart. you could set the add to cart behavior to redirect to the cart display page, that would show them if the item is added to the cart or not, but showing an alert on clicking the add to cart button does not really address the issue.
but if you want to do it any way, add an onClick event to the add to cart button:
onClick="alert('Item Added to cart'); return true;"