Is it possible to have a JavaScript event triggered based on a server event? for example, let's say I'm trying to create a chat application - would the client-side have to constantly send a request to check for new messages, or would the server be able to send an instruction saying that a new message has arrived?
It is not possible for the server to contact the client without a request from the client. Yes, you will have to constantly query the server to know about any server event. You can use Ajax for this purpose so that the user will no know about the querying.