remoteTweets.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <script type="text/javascript" src="../build/jsMotif.js"></script>
  6. <title>jsMotif example</title>
  7. </head>
  8. <body>
  9. <div id="placeHolder">
  10. </div>
  11. <div id="template" style="display:none">
  12. <ul each="{results}">
  13. <li>
  14. <label>from: </label><span fill={from_user}></span><br>
  15. <em fill={text}></em>
  16. </li>
  17. </ul>
  18. </div>
  19. <script type="text/javascript">
  20. var tpl = new jsMotif.Template({
  21. template: 'template',
  22. targetNode: 'placeHolder'
  23. });
  24. //JSONP (cross domain) request, use reqType: 'jsonp' and use {CB_FN} in the url to mark place where callback function name should be placed
  25. tpl.renderJSON('http://search.twitter.com/search.json?q=Javascript&result_type=mixed&callback={CB_FN}',
  26. {
  27. reqType: 'jsonp',
  28. timeout: 5000
  29. });
  30. </script>
  31. </body>
  32. </html>