Page 1 of 1

Pop up message for notification

Posted: Mon May 18, 2009 8:08 pm
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.

Re: Pop up message for notification

Posted: Mon May 18, 2009 8:11 pm
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.