Created
November 30, 2009 17:12
-
-
Save bmatzelle/245561 to your computer and use it in GitHub Desktop.
Vuzit on page changed example
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>Vuzit onPageChanged Example</title> | |
<link href="http://vuzit.com/stylesheets/Vuzit-2.9.css" rel="Stylesheet" type="text/css" /> | |
<script src="http://vuzit.com/javascripts/Vuzit-2.9.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// Global viewer variable. | |
var viewer = null; | |
// Called whenever the page changes. | |
function pageChanged() { | |
document.getElementById("pager").innerHTML = "Page: " + viewer.getPageNumber(); | |
} | |
// Called when the page finishes loading. | |
function initialize() { | |
vuzit.Base.apiKeySet("b12c30a5-77aa-ef5f-9b4f-b83a4f88149e"); | |
viewer = vuzit.Viewer.fromId("cq3", {}); | |
// Passes in the onPageChanged option as the "pageChanged" function defined above | |
viewer.display(document.getElementById("vuzit_viewer"), { onPageChanged: pageChanged }); | |
} | |
</script> | |
</head> | |
<body onload="initialize()"> | |
<div id="vuzit_viewer" style="width: 650px; height: 500px;"></div> | |
</body> | |
<div id="pager">Page: 1</div> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment