/[meteor]/trunk/public_html/index.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 /trunk/public_html/index.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 68 - (hide annotations)
Sat Mar 28 01:45:04 2009 UTC (11 years ago) by dpavlin
File MIME type: text/html
File size: 983 byte(s)
example page with output from test channel
1 dpavlin 68 <html>
2     <head>
3     <title>Koha RFID</title>
4    
5     <script type="text/javascript" src="/jquery-1.3.2.js"></script>
6     <script type="text/javascript" src="/meteor.js"></script>
7     <script type="text/javascript">
8    
9     // Set this to something unique to this client
10    
11     function process(data) {
12     console.info('process', data);
13     $('#test').append( data );
14     };
15    
16     $(document).ready( function() {
17    
18     var channel = 'test';
19    
20     Meteor.hostid = '409897502705';
21    
22     // Our Meteor server is on the data. subdomain
23     Meteor.host = 'data.' + location.hostname;
24     Meteor.port = 4670;
25    
26     // Call the test() function when data arrives
27     Meteor.registerEventCallback("process", process );
28    
29     console.info('Meteor connect', channel, Meteor.status );
30    
31     // Join the demo channel and get last five events, then stream
32     Meteor.joinChannel( channel, 5 );
33     Meteor.mode = 'stream';
34    
35     // Start streaming!
36     Meteor.connect();
37    
38    
39     });
40    
41     </script>
42     </head>
43    
44     <body>
45    
46     <h1>
47     Koha RFID data
48     </h1>
49    
50     <div id="test">
51     Waiting for data...
52     </div>
53    
54     </body>
55    
56     </html>

  ViewVC Help
Powered by ViewVC 1.1.26