/[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

Annotation of /www/rfid.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (hide annotations)
Wed Jun 24 13:39:43 2009 UTC (15 years ago) by dpavlin
File MIME type: text/html
File size: 1096 byte(s)
color tags according to security byte

1 dpavlin 47 <html>
2     <head>
3     <title>3M RFID</title>
4     <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
5 dpavlin 52 <style type="text/css">
6     .status {
7     background: #ff8;
8     }
9 dpavlin 54
10     .da {
11     background: #fcc;
12     }
13    
14     .d7 {
15     background: #cfc;
16     }
17 dpavlin 52 </style>
18 dpavlin 47 <script type="text/javascript">
19    
20     function scan_tags() {
21     console.info('scan_tags');
22     $.getJSON("http://localhost:9000/scan?callback=?",
23 dpavlin 52 function(data,textStatus) {
24 dpavlin 47 var html = 'No tags in range';
25     if ( data.tags ) {
26     html = '<ul class="tags">';
27     $.each(data.tags, function(i,tag) {
28     console.debug( i, tag );
29 dpavlin 54 html += '<li class=' + tag.security + '><tt>' + tag.sid + ' ' + tag.content + '</tt>';
30 dpavlin 47 });
31     html += '</ul>';
32     }
33 dpavlin 52 html = '<div class=status>'
34     + textStatus
35     + '##########'.substr(0,data.time % 10)
36     + '</div>'
37     + html
38     ;
39 dpavlin 47 $('#tags').html( html );
40 dpavlin 49 window.setTimeout(function(){
41     scan_tags();
42     },200); // re-scan every 200ms
43 dpavlin 47 });
44     }
45    
46     $(document).ready(function() {
47     scan_tags();
48     });
49     </script>
50     </head>
51     <body>
52    
53     <h1>RFID tags in range</h1>
54    
55     <div id="tags">
56     RFID reader not found or driver program not started.
57     </div>
58    
59     </body>
60     </html>

  ViewVC Help
Powered by ViewVC 1.1.26