Integrate workbook into web page
Google offers webmasters a new service: just like you can post videos on your pages, now you are offered to integrate books, thanks to a block of JavaScript code to add...
Thus, a web page replaces an e-book, and it becomes possible to read everywhere using a netbook and Internet connection.
Display
Explanation
The code is always the same, it works the same as with Youtube, it is the number of the book that makes the choice in the -48GAAAAQAAJ copy for Victor Hugo's Les Miserables.
<script type="text/javascript" src="http://books.google.com/books/previewlib.js"> </script> <script type="text/javascript"> GBS_setLanguage('fr'); GBS_insertEmbeddedViewer('8U2oAAAAQBAJ',500,500);
</script>
To get the book code, we search Google Books Search. When the work is found, the URL contains between id = and & code. Example for "Les Misérables":
http://books.google.com/books?id=-48GAAAAQAAJ&printsec=frontcover
&dq=les+mis%C3%A9rables&hl=fr
The code is -48GAAAAQAAJ and scripted as a GBS_insertEmbeddedViewer parameter. The other two parameters are width and height.
See also
- Google gadgets.
More information
- Inside Google Book Search (English). Explanations of research in the book .
- Generate Script Code. To create JavaScript code from scratch, follow the instructions on this page. (English).