/dev/docs/api/books/example1.html
Type: /type/rawtext
rawtext: value: <html>
  <head>
    <title>Dynamic links with a callback example</title>

    <script>
      // Function to process OL Books and update the DOM.
      function processOLBooks(booksInfo) {
        for (isbn in booksInfo) {
         var element = document.getElementById(isbn);
         var bookInfo = booksInfo[isbn];
         element.href = bookInfo.preview_url;
         element.style.display = '';
         if (bookInfo.preview == "full") {
            element.innerHTML = "Read on Open Library";
        }
       }
     }
    </script>
  </head>
  <body>

   <h1>Book Links</h1>

   <p>Here are a list of my favorite books. You should really check them out!</p>
   <br/>
   <table>
     <thead>
      <tr>
        <th>Name</th>
        <th>ISBN</th>
        <th colspan="2">Links</th>

      </tr>
     </thead>
     <tbody>
      <tr>
        <td>Programming Perl</td>
        <td>0596000278</td>
        <td><a href="http://amazon.com/gp/product/0596000278">Amazon</a></td>
        <td><a id="0596000278" 
            style="display:none;">Browse on Open Library</a></td>
      </tr>
      <tr>
        <td>Alice in Wonderland (First edition!)</td>
        <td>00-no-isbn</td>
        <td><a href="http://amazon.com/gp/product/00-no-isbn">Amazon</a></td>
        <td><a id="00-no-isbn" 
             style="display:none;">Browse on Open Library</a></td>
            
      </tr>
      <tr>
        <td>Down & Out</td>

        <td>ISBN0765304368</td>
        <td><a href="http://amazon.com/gp/product/ISBN0765304368">Amazon</a></td>
        <td><a id="ISBN0765304368"
            style="display:none;">Browse on Open Library</a></td>
      </tr>
      <tr>

        <td>Harry Potter</td>
        <td>0439554934</td>
        <td><a href="http://amazon.com/gp/product/0439554934">Amazon</a></td>
        <td><a id=0439554934 
            style="display:none;">Browse on Open Library</a></td>
      </tr>

     </tbody>
   </table>
   <br>
   
    <!-- Send request to Open Library server -->
    <script src="http://openlibrary.org/api/books?bibkeys=0596000278,00-no-isbn,ISBN0765304368,0439554934&callback=processOLBooks">
    </script>
  </body>
</html>
content_type: text/html