Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 10-02-2015, 05:12 PM   #1
CFu
Baseband Member
 
Join Date: Mar 2011
Posts: 52
Post Catch the text changed event

On this Minecraft server control panel website (which I didn't write), you can see the amount of players currently logged into the server in the 'Online Players 0/8' section at the top right.

I want to listen to the DOM for changes in that particular 'Online players' text. If the number changes to anything greater than '0 players online', I want to generate an alert('new player!'); on my client (not on the server) and possibly play a sound.

Here's what I know:
The control panel seems to be refreshing (polling) the 'status_onlineplayers' td element every second. If you inspect that element, you get this code:
<td id="status_onlineplayers">0 / 8</td>

What would be the best approach to do this? What scripting languages? I prefer to work with languages I already know such as Javascript. I read online it should be possible with jQuery.
CFu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 06:14 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0