Pop up message for notification

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
mobone
Forum Newbie
Posts: 8
Joined: Mon May 18, 2009 8:04 pm

Pop up message for notification

Post by mobone »

I'm brainstorming a php game, and need the user to be notified immediately if they are attacked. I'd like a pop up box saying "You have just been attacked! Retaliate or take cover??" Then show the two buttons for the choices. How would I go about incorporating this into a mainly php script.

Much appreciated.
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Pop up message for notification

Post by it2051229 »

keep on refreshing the player's PHP web page accessing a "data" stored on the server that tells if it is being attacked or not... or use javascript's XMLHTTP request to avoid full page refreshing.
Post Reply