/[RFID]/www/rfid.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /www/rfid.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 54 by dpavlin, Wed Jun 24 13:39:43 2009 UTC revision 55 by dpavlin, Fri Jun 26 11:27:32 2009 UTC
# Line 17  Line 17 
17  </style>  </style>
18  <script type="text/javascript">  <script type="text/javascript">
19    
20    function got_visible_tags(data,textStatus) {
21            var html = 'No tags in range';
22            if ( data.tags ) {
23                    html = '<ul class="tags">';
24                    $.each(data.tags, function(i,tag) {
25                            console.debug( i, tag );
26                            html += '<li class=' + tag.security + '><tt>' + tag.sid + ' ' + tag.content + '</tt>';
27                    });
28                    html += '</ul>';
29            }
30            html = '<div class=status>'
31                    + textStatus
32                    + '##########'.substr(0,data.time % 10)
33                    + '</div>'
34                    + html
35                    ;
36            $('#tags').html( html );
37            window.setTimeout(function(){
38                    scan_tags();
39            },200); // re-scan every 200ms
40    };
41    
42  function scan_tags() {  function scan_tags() {
43          console.info('scan_tags');          console.info('scan_tags');
44          $.getJSON("http://localhost:9000/scan?callback=?",          $.getJSON("http://localhost:9000/scan?callback=?", got_visible_tags);
         function(data,textStatus) {  
                 var html = 'No tags in range';  
                 if ( data.tags ) {  
                         html = '<ul class="tags">';  
                         $.each(data.tags, function(i,tag) {  
                                 console.debug( i, tag );  
                                 html += '<li class=' + tag.security + '><tt>' + tag.sid + ' ' + tag.content + '</tt>';  
                         });  
                         html += '</ul>';  
                 }  
                 html = '<div class=status>'  
                         + textStatus  
                         + '##########'.substr(0,data.time % 10)  
                         + '</div>'  
                         + html  
                         ;  
                 $('#tags').html( html );  
                 window.setTimeout(function(){  
                         scan_tags();  
                 },200); // re-scan every 200ms  
         });  
45  }  }
46    
47  $(document).ready(function() {  $(document).ready(function() {

Legend:
Removed from v.54  
changed lines
  Added in v.55

  ViewVC Help
Powered by ViewVC 1.1.26