Created
May 6, 2011 21:02
-
-
Save fixlr/959777 to your computer and use it in GitHub Desktop.
ProcessGBSBookInfo() fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Function to process GBS info and update the dom. | |
function ProcessGBSBookInfo(booksInfo) { | |
for (isbn in booksInfo) { | |
var url_elem = document.getElementById(isbn); | |
var pic_elem = document.getElementById("google_book"); | |
var gbs_elem = document.getElementById("GBSDiv"); | |
var bookInfo = booksInfo[isbn]; | |
if (bookInfo) { | |
gbs_elem.innerHTML="<fieldset style='width:100px'><div align=center></div></fieldset>"; | |
if (bookInfo.thumbnail_url) { | |
gbs_elem.innerHTML="<fieldset style='width:100px'><div align=center><a href=" + bookInfo.info_url +" style='text-decoration:none' target='_blank'><img src=\"" + bookInfo.thumbnail_url + "\" width=\"52\" /><br>Link to Google Books</a></div></fieldset>"; | |
} | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment