view static-files/example-client.html @ 59:ce0fb8a780a4

Removed extraneous console.log().
author Atul Varma <avarma@mozilla.com>
date Mon, 28 Jun 2010 19:05:02 -0700
parents 422fcf9774b1
children
line wrap: on
line source

<html>
<head>
  <title>Example Client</title>
  <style>
  #error {
    background: red;
    color: white;
    display: none;
  }
  </style>
</head>
<body>
<p>JSON data for all users should appear below, unless you're not
logged in, in which case you should <a target="_blank" href="/">log
in</a>.</p>
<pre id="users"></pre>
<div id="error">
  Error: <span class="reason"></span>
</div>
<script src="js/api.js"></script>
<script src="js/jquery-1.4.2.min.js"></script>
<script>
$(window).ready(function(event) {
  var api = new Summit.Client();
  api.getAllUsers(function(response) {
    if (response.error) {
      $("#error .reason").text(response.error);
      $("#error").slideDown();
    } else {
      $("#users").text(JSON.stringify(response.users, null, 2));
    }
  });
});
</script>
</body>
</html>