<< Click to Display Table of Contents >>
ScriptEx Example - HTML5 Viewer
<!DOCTYPE html>
<html style="height:100%">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" type="text/css"/>
<script src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://127.0.0.1:8080/ozrviewer/ui.dynatree.css" type="text/css"/>
<script type="text/javascript" src="http://127.0.0.1:8080/ozrviewer/jquery.dynatree.js" charset="utf-8"></script>
<script type="text/javascript" src="http://127.0.0.1:8080/ozrviewer/OZJSViewer.js" charset="utf-8"></script>
<!-- If you want to run the HTML5SVG viewer please change the OZJSViewer.js to OZJSSVGViewer.js.
<script type="text/javascript" src="http://127.0.0.1:8080/ozrviewer/OZJSSVGViewer.js" charset="utf-8"></script>
-->
<script language="JavaScript">
function Report_Save() {
OZViewer.ScriptEx("save", "export.applyformat=xls;excel.filename=sample.xls", ";");
}
function Report_Print() {
OZViewer.ScriptEx("print", "print.copies=2;print.pagerange=current;print.lockopt=true", ";");
}
</script>
</head>
<body style="width:98%;height:98%">
<input type="button" value="Save Report" onclick="Report_Save()">
<input type="button" value="Print Report" onclick="Report_Print()">
<div id="OZViewer" style="width:98%;height:98%"></div>
<script type="text/javascript">
function SetOZParamters_OZViewer(){
var oz;
oz = document.getElementById("OZViewer");
oz.sendToActionScript("connection.servlet","http://127.0.0.1:8080/oz/server");
oz.sendToActionScript("connection.reportname","sample.ozr");
return true;
}
start_ozjs("OZViewer","http://127.0.0.1:8080/ozrviewer/");
</script>
</body>
</html>