/[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 47 - (show annotations)
Tue Jun 23 13:50:50 2009 UTC (14 years, 11 months ago) by dpavlin
File MIME type: text/html
File size: 754 byte(s)
example web page using JSONP and jquery library

1 <html>
2 <head>
3 <title>3M RFID</title>
4 <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
5 <script type="text/javascript">
6
7 function scan_tags() {
8 console.info('scan_tags');
9 $.getJSON("http://localhost:9000/scan?callback=?",
10 function(data) {
11 var html = 'No tags in range';
12 if ( data.tags ) {
13 html = '<ul class="tags">';
14 $.each(data.tags, function(i,tag) {
15 console.debug( i, tag );
16 html += '<li>' + tag.sid + ' <tt>' + tag.content + '</tt>';
17 });
18 html += '</ul>';
19 }
20 $('#tags').html( html );
21 scan_tags();
22 });
23 }
24
25 $(document).ready(function() {
26 scan_tags();
27 });
28 </script>
29 </head>
30 <body>
31
32 <h1>RFID tags in range</h1>
33
34 <div id="tags">
35 RFID reader not found or driver program not started.
36 </div>
37
38 </body>
39 </html>

  ViewVC Help
Powered by ViewVC 1.1.26