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

Contents of /www/rfid.html

Parent Directory Parent Directory | Revision Log Revision Log


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

1 <html>
2 <head>
3 <title>3M RFID</title>
4 <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
5 <style type="text/css">
6 .status {
7 background: #ff8;
8 }
9
10 .da {
11 background: #fcc;
12 }
13
14 .d7 {
15 background: #cfc;
16 }
17 </style>
18 <script type="text/javascript">
19
20 function scan_tags() {
21 console.info('scan_tags');
22 $.getJSON("http://localhost:9000/scan?callback=?",
23 function(data,textStatus) {
24 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 html += '<li class=' + tag.security + '><tt>' + tag.sid + ' ' + tag.content + '</tt>';
30 });
31 html += '</ul>';
32 }
33 html = '<div class=status>'
34 + textStatus
35 + '##########'.substr(0,data.time % 10)
36 + '</div>'
37 + html
38 ;
39 $('#tags').html( html );
40 window.setTimeout(function(){
41 scan_tags();
42 },200); // re-scan every 200ms
43 });
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