开发者

pop up warning messages

I have a weather cam and a stream server set up in a Yacht club. At times for variuos reasons the server stops running and should be restarted. I made a PHP script to check every 10 min using $fp = @fsockopen("$site", 80, $errno, $errstr, 30) and a javascript timer in the page. I like a warning message to pop up when $fp is false. This message should be开发者_Go百科 on top of whatever windows the office staff is currently using. Javascript alert() would be perfect, problem is that alert() stops processing threads and the timer and further checking untill someone is kind enough to click OK.


Well, you don't have to use an alert box. You can create a message in plain old HTML and CSS and position it on top of everything else.

You might also use one of the numerous jQuery modal dialog plugins, such as: http://www.queness.com/post/77/simple-jquery-modal-window-tutorial

There are lots of them, and a quick Googling will help you find one that works for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜