For our association, I'm going to build a live score, which the intermediate handball evans cycles games can be. Followed live I hold the position itself in which I update the database with my phone.
Now my question is, how can I constantly check whether the position has changed in the db without the user has hindered it? Script And if he has changed, the intermediate course, evans cycles must be changed.
Note: jQuery is required. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 <? Php / / colors, although it is not a PHP script function timer (time ) {if (time> 0) {time = time - 1 countdown timer = setTimeout ("chat timer (" + time + ")", 1000)} else {if (document getElementById ('mini-chat. ") = null) {setLedenlijst! ()}}} function setLedenlijst () {$. ajax ({url: 'ledenlijst.php', type: 'POST', evans cycles data: 'text', success: function (feedback) {$ ('# settings') html (feedback);}.}); timer (60 )} setLedenlijst evans cycles ();>
Sylvain Boezer
# # Scripts / intermediate-update.php # # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <php include 'config.php';? Print '<table width="610">'; $ query = mysql_query ("SELECT * FROM ORDER BY id DESC live score"); while ($ result = mysql_fetch_array ($ query)) {print '<tr> <td>. $ Result ['home team']. </ Td> <td>. $ Result ['home']. '-'. evans cycles $ Result evans cycles ['from']. </ Td> <td>. $ Result ['away team']. </ Td> </ tr> ';} print "</ table>";?>
Tell what is going wrong, and what happens? You may perhaps have written, intermediate-update.php wrong or not Divje with an id = "positions"? You may miss self insert? Hey jQuery file
Just as always. timer (60) does the trick ;-) He then continues every 60 seconds. update or each time you refreshed for example to go. to another page
Why two files?
Sylvain Boezer
livescore.php: http://www.wittester.nl/livescore.php intermediate-update.php: http://www.wittester.nl/tussenstanden-update.php jquery.js: http://www.wittester. com / jquery.js score.js: http://www.wittester.nl/score.js
3-02-2010 18:11 Re: Live Score updater
I adjust the script. Is more stuff than I thought between: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 <PHP <head> <script? type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"> </ script> <script type = "text / javascript" > function timer (time) {if (time> 0) {time = time - 1 countdown timer = setTimeout ("timer (" + time + ")", 1000)} else {setLedenlijst ()}} function setLedenlijst () {$ . ajax ({url: 'scripts / intermediate-update.php ", type:' POST ', data:' text ', evans cycles success: function (feedback) {$ (' evans cycles # settings') html (feedback);}.}) , timer (5)} setLedenlijst () </ script> </ head>>?
I see him ;-)
A look back at 2013 news PFCongres Groningen Amersfoort welcome new local user groups PHP 5.3 "End Of Life" Schedule and online ticket sales started tutorial PFZ.nl and AmsterdamPHP present: Test Fest!
PFZ.nl about our house rules The Association - Join Disclaimer Privacy Credits PFZ.nl Business Advertising on PFZ.nl Our partners Contact PFZ.nl options Follow us on twitter Join us at LinkedIn # pfz on Freenode IRC Report bug Sign In forgot password? Username Password Remember login Login
ADSL - Telfort Internet - Ziggo All in one
No comments:
Post a Comment